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

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

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:
Our top 10 things to watch in the stock market Friday
Higher interest rates have made family offices pickier about investing in real estate
Russia and Ukraine trade fresh strikes despite renewed push for U.S.-brokered peace talks
Continuing Continuing Estrangement
Movie: Tamala 2010: A Punk Cat in Space
Stargate SG-1: The Other Guys Rewatch
Slow Horses: Judgment Day Show Only
The Great British Bake Off: Dessert Week
American Express is cutting 5% of its workforce to 'prepare for AI'
Corruption is voters' top issue ahead of midterm election, CNBC survey shows