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

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

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:
What obesity drugmakers see next in the market: More pills, easier access and drug combinations
Wall Street braced for a private credit meltdown. The risk of one is rising
Airlines cancel hundreds of flights as massive winter storm sweeps across U.S.
Capital One is buying startup Brex for $5.15 billion in credit card firm's latest deal
Trump policies to boost low-end consumer into the midterms, says JPMorgan. These stocks will benefit
A former Trump official wants to build a massive data center in a remote corner of Greenland. Will it work?
Intel stock drops 15% as manufacturing troubles overshadow earnings beat
S&P 500 and Nasdaq rise led by tech, Dow struggles as Street wraps up wild week: Live updates
The U.S. states where you can retire at 65 with less than $1 million in savings
Asia-Pacific markets trade mixed amid geopolitical uncertainties