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

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

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:
Ken Griffin says Citadel unwound more than 80% of risk tied to Situational Awareness portfolio
Kalshi traders think the bitcoin rally could end the year near current levels
Accordia Bank is offering a 5.00% APY booster on high-yield savings account for its rebrand — how to get it
'A delicate dance': JD Vance says economic pressure is the best way to achieve Washington's objectives in Iran
Star Trek: Strange New Worlds: Level-Five Transporter Accident
Book: Red Dragon
Movie: Camp
Stargate SG-1: Sentinel Rewatch
Dow surges 500 points Friday, but index posts back-to-back weekly losses
Six investors reveal the biggest market risks — and one strategy they agree on