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

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

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:
Ford Q2 sales drop 10.3% due to F-Series supplier issue, falling EV demand
Americans are paying record prices for steak. Here's why demand isn't cracking
Stock market gains minted nearly 1 million new millionaires in 2025, new UBS report says
Most prediction market contracts have low volume, leaving users exposed to volatility and bots
Jeff Bezos' family office backed five AI startups in June
Apple plans five new iPhones through 2027, eyes Chinese-made chips amid foldable push, reports say
Movie: Death at a Funeral
Book: The Sword of the Lictor
Movie: The Last Viking
Movie: Shelf Life