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

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

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's next as the British pound hits its highest in more than three years?
Answered: [New Free Plugin] : Points to the users on each Activeday
Nvidia heads for 5-day win streak as it hits record highs
What we know so far about Jeff Bezos' $50 million star-studded luxury Venice wedding
Analysts like these beaten-down stocks heading into the second half of 2025
Andrew Cuomo concedes the New York City mayoral primary to Zohran Mamdani, who leads in the first-choice vote
NATO allies agree to higher 5% defense spending target
Google is primed for significant gains ahead. Using options to capture the potential pop
Mortgage rates and demand are stuck in a holding pattern
Women's Tennis Association extends media rights deal with Tennis Channel through 2032