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

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

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
Bank of America boosts Micron price target, sees upside driven by tight memory supply
Iran’s regime in its ‘final days and weeks' after mass protests, Germany’s Merz says
Why Jim Cramer is bullish on Goldman Sachs and Morgan Stanley
DeepMind CEO is talking to Google CEO 'every day' as lab ramps up competition with OpenAI
South Korea's ex-president Yoon given 5-year jail term in first ruling over martial law
Trump pitches direct payments to consumers for health care. What policy experts say about the plan
Venezuela oil fetching 30% higher price, U.S. energy chief says, after first sale worth $500 million
Here are Needham's top picks for 2026
'Markets are callous': Why stocks aren't fazed by Iran, Greenland or Venezuela