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

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

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:
Where can I ask the MetaFilter board all my burning questions?
CoreWeave stock slides as quarterly revenue guidance disappoints
Netflix CEO Sarandos visited White House right before streamer said WBD deal is off
Netflix ditches deal for Warner Bros. Discovery after Paramount’s offer is deemed superior
UBS turns bullish on Palantir, says buy the dip on this clear AI winner
Anthropic faces lose-lose scenario in Pentagon conflict as deadline for policy change looms
Apple appears to be sitting out the AI arms race. Will the strategy work?
OpenAI announces $110 billion funding round with backing from Amazon, Nvidia, SoftBank
How high can oil and gas prices go because of the Iran war? Here are the scenarios
Monarch: Legacy of Monsters: Cause and Effect