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

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

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:
Europe has rare earths but, for now, it's at China's mercy like everyone else
Trump administration takes further steps to dismantle Department of Education
Congress approves Jeffrey Epstein files bill, sending it to Trump to sign
Why superior speed isn't selling EVs
Jim Cramer's top 10 things to watch in the stock market Wednesday
From $1 trillion spending to F-35s, U.S.-Saudi pledges aren't done deals yet
Don't pass up 'free money' during open enrollment, says benefits expert—how to choose FSA and HSA contributions
The stock market is counting on Nvidia. Here are the 'whisper numbers' the chip giant must deliver
Stocks rally, led by Alphabet jump; Wall Street awaits Nvidia earnings: Live updates
Blue Owl calls off merger of its two private-credit funds after announcement rattles stock