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

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

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) {


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:
Senate passes reauthorization of a key U.S. surveillance program after midnight deadline
Homeownership isn't for everyone, money coach says: Don't fall for artificial 'pressure to buy'
Tesla's Elon Musk postpones India trip, aims to visit this year
DIY Dishwasher Installation?
I'm a professional poker player, and have trouble sleeping, please help!
What should I make with these chicken thighs given the following...
Movie: Dead End Drive-In
Oasis launches a campaign at Kao Corp, but this battle is likely to be a difficult one
Tesla recalls Cybertruck over 'trapped pedal' issue seen in owner's viral TikTok video
Earnings momentum: Analysts are getting more bullish on these names reporting next week