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

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

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:
The Chinese box office isn't the Hollywood kingmaker it used to be. Here's why
U.S.-Iran war 'tax' begins to hit American businesses and consumers
U.S. payrolls rose by 178,000 in March, more than expected; unemployment at 4.3%
The PWHL is growing and post-Olympics boom may take women's hockey to the next level
Book: Dawnshard (Stormlight Archive #3.5)
Special Event: Rifftrax Short: Promotionals
Movie: Sorority Row
Deadloch: Season 2
'Silent killers': How AI start-ups are trying to solve one of the retail industry's biggest problems
These are Bank of America’s top picks for the second quarter after a tough start to 2026