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

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

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:
Nearly half the stocks in the S&P 500 are at cross purposes with the rest of the market
Higher rates will create winners and losers in bonds, says UBS. Where the bank sees opportunity
Meta's Muse agent is attacking one of the economy's most profitable weak spots
Meta hires MongoDB CEO CJ Desai to lead enterprise unit. MongoDB shares crater
OpenAI abandons plan to release upcoming model as safety concerns escalate
Help me solve the problem of disappearing photos
How do you hang up your heaviest skirts?
San Diego Restaurants, Events, Fun Suggestions
Help Identifying 80s Dino Book
How to prevent a mid-flight kitty poo-splosion?