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

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

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:
Iran’s regime in its ‘final days and weeks' after mass protests, Germany’s Merz says
The top 10 jobs in the U.S. for 2026 all pay $100,000 or more, according to Indeed
Apple picks Google's Gemini to run AI-powered Siri coming this year
Buy this social media stock with lots of upside thanks to AI, says Evercore ISI
Bank of America boosts Micron price target, sees upside driven by tight memory supply
BNY raises profit target as CEO Robin Vince says 'turnaround' is taking hold
More drivers have $1,000-plus car loan payments. Here's what buyers can expect in 2026
Pentagon to invest $1 billion in L3Harris rocket motor business, shares surge
Intel and AMD get upgrades at KeyBanc thanks to strong server demand for AI
Salesforce releases updated Slackbot powered by Anthropic's AI model