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

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

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:
Bill Ackman built Microsoft stake in first quarter during sell-off, betting on AI and cloud growth
Trump says Xi agrees Iran must open strait, but no sign China will weigh in
Why J&J thinks its new psoriasis pill could be one of its biggest drugs ever
Sundheim's D1 Capital bought several tech stocks last quarter — with one big exception
What you need to know about Nvidia competitor Cerebras after wild IPO
Trump touted Palantir on Truth Social after buying the company's stock, records show
ISO: Good board games for 2 people to play outside while waiting in line
The Bear: Gary
The Boys: The Frenchman, the Female, and the Man Called Mother's Milk
Cisco is the most overbought stock in the S&P 500. Here are the others.