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

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

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:
Y-a-t-il un forum en français?
Trump threatens export controls on Boeing parts in response to China
Trump administration lays off dozens of CDC officials, NYT reports
Spirit Airlines wins approval for $475 million lifeline in bankruptcy court
Market sell-off: Trump post lops off $2 trillion from stocks in a single day
Luigi Mangione's lawyers seek dismissal of federal charges in assassination of UnitedHealth CEO
How Julia Roberts learned to navigate career criticism: 'I had a lot of things I needed to overcome for myself'
Dow drops almost 900 points, S&P 500 declines the most since April after Trump's new China tariff threat
Wall Street's momentum into next week gets spoiled by tariff concerns, with earnings looming
Trump says 'a lot' of federal workers are being laid off during government shutdown