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

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

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:
What does it mean for a credit card to devalue? How to protect your rewards
Advisors to the ultra rich say AI isn't a gamechanger for landing new clients
Elon Musk says Tesla taking safety supervisors out of some Robotaxi vehicles in Austin
Capital One is buying startup Brex for $5.15 billion in credit card firm's latest deal
Adani group stocks plunge as U.S. SEC looks to question founder over fraud charges
Trump administration to take 10% stake in USA Rare Earth in $1.6 billion deal, sources say
China's AI trade is quickly moving from infrastructure to applications. Watch these stocks
Asia-Pacific markets trade mixed amid geopolitical uncertainties
Shutdown odds grow as Senate Republicans won't remove DHS funding after Pretti killing
Stock futures fall as traders get set for a big week of trading: Live updates