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

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

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 is embracing Musk's Grok AI chatbot as it draws global outcry
Buy this social media stock with lots of upside thanks to AI, says Evercore ISI
Trump’s tariff gambit over Iran risks derailing U.S.–China trade deal
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
Trump floats 1-year, 10% credit card interest rate cap — what that could mean for your money
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
Fanatics to launch sports media and entertainment studio
Delta CEO sees record earnings in reach again thanks to high-end travel demand