Answered: How to prevent users level registered to sending private messages in a q2a forum?

Post date: 2024-02-07 07:22:01
Views: 129

in qa-include/pages/message.php 

change  this at line 150

if ($toaccount'flags'] & QA_USER_FLAGS_NO_MESSAGES) {

to this

if (($toaccount'flags'] & QA_USER_FLAGS_NO_MESSAGES) && qa_get_logged_in_level() < QA_USER_LEVEL_SUPER) {

and

in qa-include/pages/user-profile.php  

change this at line 791

if (qa_opt('allow_private_messages') && isset($loginuserid) && $loginuserid != $userid && !($useraccount'flags'] & QA_USER_FLAGS_NO_MESSAGES) && !$userediting) {

to this

if ((qa_opt('allow_private_messages') && isset($loginuserid) && $loginuserid != $userid && !($useraccount'flags'] & QA_USER_FLAGS_NO_MESSAGES) && !$userediting) || qa_get_logged_in_level() >= QA_USER_LEVEL_SUPER) {

Please click Here to read the full story.
 
Other Top and Latest Questions:
Answered: Why I am not able to edit my profile?
The top 10 jobs in the U.S. for 2026 all pay $100,000 or more, according to Indeed
Apple picks Google's Gemini to run AI-powered Siri coming this year
OpenAI acquires health-care technology startup Torch for $60 million, source says
Novo Nordisk CEO explains why new GLP-1 pill expands access to the weight loss drugs
Trump’s tariff gambit over Iran risks derailing U.S.–China trade deal
Does it really matter who ends up owning Warner Bros.? Media exec Tom Rogers breaks it down
Intel and AMD get upgrades at KeyBanc thanks to strong server demand for AI
Salesforce releases updated Slackbot powered by Anthropic's AI model
Global central bankers unite in defense of Fed Chair Jerome Powell