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

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

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:
Genuine Parts to split into industrial and auto businesses; sees weak FY26 profit
AI Whac-a-Mole takes over the stock market. JPMorgan says these stocks are insulated
Melius upgrades Chevron, sees upside from Venezuela and exploration push
Used car inventory is improving, but 'affordable under-$20,000 vehicles are harder to find,' expert says
Danaher to buy Masimo in $9.9 billion deal in diagnostics push
French prosecutors are investigating companies like Nestle and Danone over contaminated baby formula. Here's the latest
Curling scoreboard question
Abbott Elementary: Picture Day
Abbott Elementary: Birthday
Movie: Honey Bunch