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

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

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:
Wall Street’s top picks for 2026: JPMorgan says a rare biopharma stock could more than triple
Southwest Airlines cuts outlook on government shutdown demand hit, higher fuel costs
HPE CEO Neri pleased with quarter despite AI revenue delays as stock bounces from post-earnings dip
RFK Jr.’s vaccine panel weakens recommendation on hepatitis B shot for babies, scrapping universal guidance
S&P 500 tries to hang onto gains ahead of big events next week that could move 3 stocks
Putin says Russia is willing to supply 'uninterrupted' fuel to India, as U.S. pressures New Delhi to cut back
Judge finalizes remedies in Google antitrust case
Married millennials, here comes the crypto divorce cliff
Berkshire Hathaway is on track to lag behind the S&P 500 in Buffett's last year as CEO
Top Wall Street analysts favor these 3 stocks for their growth potential