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

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

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:
Why do I get “You do not have permission to perform this operation” when editing my listing, and how can I fix it?
Elon Musk says Tesla taking safety supervisors out of some Robotaxi vehicles in Austin
TikTok was thriving in the U.S., even before a joint venture saved it from a potential ban
Nvidia’s Huang to visit China as AI chip sales stall
Cramer says 'a big move is coming' for this financial, weighs a chip stock buy
Adani group stocks plunge as U.S. SEC looks to question founder over fraud charges
Wall Street braced for a private credit meltdown. The risk of one is rising
House passes final funding bills 8 days before shutdown, Senate now will consider
Capital One is buying startup Brex for $5.15 billion in credit card firm's latest deal
Trump withdraws 'Board of Peace' invitation to Carney in widening rift with Canada