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

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

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:
The Los Angeles Lakers sold for $12.5 billion. Here’s what every NBA team is now worth
As GOP warns data centers put Ohio Senate seat at risk, Husted defends energy policy
Kalshi traders think the bitcoin rally could end the year near current levels
An overlooked AI winner names a new CFO — plus, Nvidia's key earnings loom
Bitcoin surges 22% for the week as investor optimism floods back
Book: The Lives Of The Muses: Nine Women & the Artists They Inspired
Book: Red Dragon
Stargate SG-1: Sentinel Rewatch
The Bombing of Pan Am 103: The Bombing of Pan Am 103 (all episodes)
U.S., Canada fail to reach a tariff deal, deepen trade war