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

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

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:
Trademarks, copyrights and patents are all forms of IP: Here's what they protect
HPE CEO Neri pleased with quarter despite AI revenue delays as stock bounces from post-earnings dip
Buy the dip in this AI 'neocloud' and don't believe bubble 'conspiracy theories,' says Freedom Capital's Meeks
You don't have to tailor your finances to the Fed — here are 3 money moves that work any time
Trump admin views Netflix and Warner Bros. deal with 'heavy skepticism': Senior official
Senior US diplomat calls EU policies bad for trans-Atlantic partnership
Judge finalizes remedies in Google antitrust case
Beef prices are soaring. Here's why America is facing record-low cattle numbers
Warren Buffett's Berkshire Hathaway nailed the timing on Alphabet — whether by design or not
David Ellison's hunt for WBD made David Zaslav richer — and it may not be over