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

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

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:
Senate passes BAAJA permitting reform bill backed by AI, energy sectors
S&P 500 heads for 6th straight decline. Plus, J&J advances two key products
Amid recent banking outages, should you start carrying cash again? Top advisors weigh in
How do I HSA?
[Free Plugin] Truth or Dare Roulette for Answers (Customizable Colors & Dynamic PNG Badge)
Movie: Giant Little Ones
VisionQuest: Forever
A24 is having a great year at the box office. That could give HBO Max a streaming edge
Anthropic defies the odds, holding record IPO despite ‘massively disruptive’ market
AI can help find holiday deals — but it's not great at spotting scams, experts say