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

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

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:
Delta CEO sees record earnings in reach again thanks to high-end travel demand
BNY raises profit target as CEO Robin Vince says 'turnaround' is taking hold
Pentagon is embracing Musk's Grok AI chatbot as it draws global outcry
Intel and AMD get upgrades at KeyBanc thanks to strong server demand for AI
New York offshore wind project to resume construction after judge lifts Trump suspension
Why Jim Cramer is bullish on Goldman Sachs and Morgan Stanley
AI startup Replit launches feature to vibe code mobile apps
India’s exports to China surge in December while shipments to U.S. decline as Trump tariffs bite
Trump unveils health-care plan outline as Congress wrestles over Obamacare subsidies
Stocks making the biggest moves premarket: PNC, ImmunityBio, Coupang & more