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

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

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:
The private space race is spurring a luxury hotel land grab for Florida oceanfront property
JetBlue to reduce Newark, LaGuardia footprint as it forges ahead in Fort Lauderdale
Analysis: Chairman Kevin Warsh’s task forces are the key to understanding the new Fed
CME CEO Terrence Duffy says the exchange operator will sue CFTC over perpetual futures
Jim Cramer says this chipmaker is still a buy after soaring more than 200% this year
Mr. Queen: Full season
You had one job, bank.
CEOs of Anthropic and Google DeepMind call for U.S.-led AI coalition in meeting at G7
Why Wall Street banks and foreign borrowers are rushing to tap China’s cheap money
Google Gemini co-lead Noam Shazeer leaves for OpenAI