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

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

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:
Big week coming up with PCE, Nvidia earnings and then Jackson Hole. Here's what to expect
Trump admin taps former JPMorgan Chase exec Matt Zames to advise Social Security agency
Bitcoin surges 22% for the week as investor optimism floods back
International student enrollment falls amid tighter U.S. visa policies, reports show
Gold rebounds as bond jitters, debt fears and weaker dollar revive bullion demand
Most Americans aren't anti-vaccine. They're uncertain — and that's a growing public health challenge
Book: Red Dragon
Movie: Camp
Book: Listen to Your Sister by Neena Viel
U.S., Canada fail to reach a tariff deal, deepen trade war