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

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

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:
Anthropic's IPO could be 'speculative fiction' or a 'generational moment' — investors are split
Indian investors rush to Nvidia, SpaceX, Apple as local trading apps roll out access to U.S. stocks
Amazon's anti-tokenmaxxing memo says engineers should be pickier about using AI
How investors can position ahead of the Fed's next policy decision
Line of Fire: Cabin Pressure
Trump says Iran war will end 'when I want it to' as costs reportedly balloon to $47 billion
How should I handle my kids' "Trump accounts"?
Neighbour/community simulators?
Treasury Department announces new Series I bond rate of 5.51% for the next six months
Movie: Absurd