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

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

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:
Stellantis resurrects $100,000 Ram TRX V-8 pickup truck amid industry deregulation
India's KFC, Pizza Hut operators to merge in $934 million deal
Saks Group reportedly preparing to file bankruptcy after missing debt payment
Italy says U.S. sharply reduced proposed pasta tariffs after a review
Estate planning helps 'forestall bad outcomes,' author says — you need some key documents even at age 18
Bank of America is betting on these stocks, including one Big Tech laggard, in the first quarter of 2026
China’s ‘Silicon Valley’ is building robots and fortune-telling AI apps at the same time
Buffett backs new CEO Greg Abel with 'huge endorsement' in CNBC interview
Maduro is out but his top allies still hold power in Venezuela
Airlines restore Caribbean flights after U.S. lifts airspace restrictions tied to Venezuela strikes