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

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

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:
CrowdStrike is a buy, just not yet. Here's why
The Chase Sapphire Reserve's all-time-high 150,000-point bonus is ending soon. Here's why I applied
Dell Optiplex with Kubuntu
I want control of my Keyboard Shortcuts (Windows)
Widow's Bay: Your Baggage
Book: Dungeon Crawler Carl Book 8: A Parade of Horribles
Book: The Serviceberry: Abundance and Reciprocity in the Natural World
Inside Wealth: Soaring stocks created 2 million new millionaires around the world last year
Jim Cramer's top 10 things to watch in the stock market Thursday
SpaceX IPO hype has traders flocking to this mid-cap stock