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

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

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 top 10 jobs in the U.S. for 2026 all pay $100,000 or more, according to Indeed
JPMorgan Chase tops estimates as trading revenue exceeds expectations
Salesforce releases updated Slackbot powered by Anthropic's AI model
DeepMind CEO is talking to Google CEO 'every day' as lab ramps up competition with OpenAI
Rates have dropped to the lowest point in years — here are the best lenders for refinancing your mortgage
Wikipedia parent partners with Amazon, Meta, Perplexity on AI access
Goldman Sachs CEO is looking at how the Wall Street bank can get involved in prediction markets
Coinbase CEO says key crypto vote can be rescheduled after 11th hour cancellation
U.S. threats of a Greenland takeover spark talk of trade wars
'Markets are callous': Why stocks aren't fazed by Iran, Greenland or Venezuela