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

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

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:
OpenAI proposes 5% stake to Trump administration to ease Washington pressure: Report
Book: The October Film Haunt
Rivian raises 2026 delivery outlook while Lucid misses Wall Street expectations for second quarter
Led by Buc-ee’s and new rival Dolly Parton, America’s gas station chains are in a mega-sizing era
AI agents will soon be able to match human traders, Robinhood CEO tells CNBC
Stock market gains minted nearly 1 million new millionaires in 2025, new UBS report says
Google loses fight over record $4.7 billion EU antitrust fine
Why Jim Cramer says investors should 'want to own' this industrial stock
All-ages places to watch the World Cup in downtown Chicago?
Making ghost pepper popsicle how do I calibrate the heat?