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

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

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:
Pentagon to invest $1 billion in L3Harris rocket motor business, shares surge
More drivers have $1,000-plus car loan payments. Here's what buyers can expect in 2026
Salesforce releases updated Slackbot powered by Anthropic's AI model
Stocks making the biggest moves premarket: L3Harris, JPMorgan, Delta, Intel, AMD and more
DeepMind CEO is talking to Google CEO 'every day' as lab ramps up competition with OpenAI
Cloudflare acquires AI data marketplace Human Native
U.S. threats of a Greenland takeover spark talk of trade wars
Here are Needham's top picks for 2026
Stocks making the biggest moves premarket: PNC, ImmunityBio, Coupang & more
'Markets are callous': Why stocks aren't fazed by Iran, Greenland or Venezuela