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

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

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:
Lucid stock plunges as EV maker begins 'operational reset,' delays midsize vehicle
The IRS is getting better at spotting crypto tax mistakes. Here's what it means for investors
Oil prices fall on negotiations to manage ship traffic in Strait of Hormuz
Tanger CEO says World Cup drove up traffic, sales this summer
Manager of DRAM memory chip stock trade blockbuster ETF is back with new AI thematic bet
Lisa Su brushes off Musk's Nvidia commitment as AMD stock sinks after earnings
Google chief scientist Jeff Dean leaving in AI reshuffle after 27 years at company
Uber stock sinks 7% after weak guidance despite revenue growth
S&P 500 gives up gain as 4-day rally loses momentum; Dow boosted by Nvidia: Live updates
Disney tops earnings estimates as parks and streaming offer a boost