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

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

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:
Apple's elevation of silicon head Johny Srouji signals sprint to build in-house chips for all devices
Oil edges lower after Trump extends ceasefire with Iran
Did this crow poop on me deliberately?
Is it okay to leave the toilet seat up in a shared office space?
Trump extends ceasefire in Iran, citing 'seriously fractured' Iranian government
Book: Wind and Truth (Stormlight Archive #5)
Hormuz is just a ‘dry run’ if China and U.S. go to war in the Pacific, Singapore foreign minister warns
These stocks may rip if the Iran conflict is resolved, UBS says
Judge dismisses Kash Patel's defamation lawsuit over claim he frequented 'nightclubs'
Japan's Nikkei 225 rises to record high as Trump extends Iran ceasefire