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

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

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:
Answered: Why I am not able to edit my profile?
Trump’s tariff gambit over Iran risks derailing U.S.–China trade deal
JPMorgan Chase tops estimates as trading revenue exceeds expectations
Trump says Microsoft will make changes to ensure consumers don't pay for power used in AI buildout
Trump floats 1-year, 10% credit card interest rate cap — what that could mean for your money
Does it really matter who ends up owning Warner Bros.? Media exec Tom Rogers breaks it down
Pentagon to invest $1 billion in L3Harris rocket motor business, shares surge
Stocks making the biggest moves premarket: L3Harris, JPMorgan, Delta, Intel, AMD and more
Salesforce releases updated Slackbot powered by Anthropic's AI model
Delta CEO sees record earnings in reach again thanks to high-end travel demand