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

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

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:
Goldman picks China healthcare stocks for a post-AI trade
Movie: Lethal Weapon 2
Snowpiercer: A Single Trade Rewatch
Movie: Stage Fright
Any recommendations of what to do in Paris.
Trump says U.S. may keep Iranian oil 'like Venezuela' as Gulf-Iran Hormuz talks stall
The 10-year Treasury is closing in on 5%. How it gets there matters more
Stock futures fall as investors weigh AI safety concerns, oil gains: Live updates
OpenAI rules out IPO this year as Altman, Musk & Amodei warn AI is moving too fast
Anthropic's Amodei says China presents 'toughest dilemma' for his proposed AI slowdown