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

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

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:
FDA approves psoriasis pill from J&J that rivals shots Tremfya, Skyrizi
Inflation dominates Powell's remarks, pressures stocks. Plus, big earnings tonight
Fed votes to hold rates steady, notes 'uncertain' impacts from Iran war
Iran war poses challenges to high-margin Middle East car market
Beautiful Hidden Picture books?
What is a film seminar
Trump warns to 'blow up' South Pars gas field in Iran if strikes against Qatar energy continue
Fed holds interest rates steady — here’s what that means for consumers
Bank of Japan keeps rates steady as expected, warns Iran war may push up inflation
Trump waives Jones Act shipping rules for 60 days to steady oil market