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

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

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?
OpenAI acquires health-care technology startup Torch for $60 million, source says
Powell investigation: Drumbeat of Republican opposition grows on Capitol Hill
Bank of America boosts Micron price target, sees upside driven by tight memory supply
Elizabeth Warren fears workers will 'lose big' with 401(k) crypto, presses SEC chair Atkins for answers
More drivers have $1,000-plus car loan payments. Here's what buyers can expect in 2026
RV buyers are trading up and this stock is set to benefit, Loop Capital says
Does it really matter who ends up owning Warner Bros.? Media exec Tom Rogers breaks it down
Salesforce releases updated Slackbot powered by Anthropic's AI model
Global central bankers unite in defense of Fed Chair Jerome Powell