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

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

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:
U.S. sanctions companies and individuals in the Middle East and China for helping Iran
There's little chance of a hantavirus global outbreak. What the latest odds say
How to take control of the AI data center boom and built it into your own home in the future
At 103 years old, I’m the ‘world’s oldest doctor’: My 3 rules for a long, happy life are so simple—I tell it to 'all my patients'
AI-powered scam calls are getting more convincing—and more common: 'It was her voice, I know her scared cry'
Passengers begin evacuating from cruise ship hit by hantavirus
For All Mankind: The Sirens of Titan
Special Event: Rifftrax Shorts: ANIMALS
Alphabet's 160% rally in a year reflects value of owning 'most of the stack' in AI
Saudi Aramco Q1 profit jumps 26% as key pipeline reaches capacity amid Iran war