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

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

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:
Multifamily housing leads CRE bid competition in October
New Jersey deli fraudsters fail to pay millions of dollars in restitution, judge says
Dick's Sporting Goods to shutter some Foot Locker stores to protect profits
Private payroll losses accelerated in the past four weeks, ADP reports
Nvidia stock falls 4% on report Meta will use Google AI chips
Sen. Jim Justice, wife sued for $5 million in unpaid taxes from 2009 as legal woes mount
Michael Burry's next 'Big Short': An inside look at his analysis showing AI is a bubble
Nvidia namechecks Michael Burry in secret memo pushing back on AI bubble allegations
Sellers are taking their homes off the market at the fastest pace in nearly a decade
Ukraine reportedly agrees to U.S.-brokered peace proposal