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

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

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:
DOJ charges Southern Poverty Law Center with fraud over secret funding of extremist groups
Amazon launches GLP-1 weight loss program, promising 'fast, convenient' access
New Apple CEO John Ternus doubted himself when he started: 'I wasn't sure I belonged'
Did this crow poop on me deliberately?
I am your manager but I'm not your manager
Google recaptcha V3 here
From: Season 4 (Full Season)
Movie: The Stranger
Movie: The Blue Caftan
UK inflation jumps to 3.3% in March as fuel prices surge amid Iran war