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

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

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:
2026 will bring more GLP-1 weight loss pills — and new habits. These stocks are poised to benefit
Student loan forgiveness is taxable again: Start planning for the 'tax bomb,' CFP says
Minimum wage just went up in 19 states—workers in one state are getting a $2 an hour raise
Bernie Sanders and Ron DeSantis speak out against data center boom. It's a bad sign for AI industry
Italy says U.S. sharply reduced proposed pasta tariffs after a review
Estate planning helps 'forestall bad outcomes,' author says — you need some key documents even at age 18
Chip stocks rally to start 2026 after third-straight winning year
Behind the mesh curtain: Why airline class wars will intensify in 2026
These are the most overbought and oversold stocks in the S&P 500 as 2026 begins
South Korea's Lee begins China state visit after North fires missiles