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

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

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:
Top 10 trending destinations for U.S. travelers in 2026: 'Americans are discovering their own backyard,' expert says
Carl Icahn returns to a familiar sector — auto repair — as he builds a 15% stake in Monro
Bank of America says Domino’s Pizza is among the most likely M&A candidates
FAA issues order prohibiting MD-11 flights pending inspection after fiery UPS jet crash
Trump tells Senate Republicans to send federal health insurance money 'directly to the people'
Analysts call this lagging portfolio stock a buy — plus, what's behind Nvidia's decline
U.S. and Switzerland working on a deal to slash 39% tariffs
AI spending is not all equal. Wall Street rewards hyperscalers, punishes DoorDash and Duolingo
If the Supreme Court orders Trump to repay tariffs, U.S. importers say it wouldn't be 'messy'
Real estate titan Barry Sternlicht says he will 'have to' drop employees in favor of AI