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

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

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:
New Trump tariffs collection hits $200 billion, Customs says
Trump doubles down on Rob Reiner criticism after killing; director's son in custody
Startup backed by Altman, JPMorgan announces capital lending partnership with Amazon
Trump sues BBC for $10 billion, claims defamation from Panorama documentary
Ford to record $19.5 billion in special charges related to EV pullback
U.S. crude oil drops below $55 a barrel, hits lowest level since early 2021
Former iRobot CEO calls Roomba maker's bankruptcy 'a tragedy for consumers'
As catastrophe losses top $100 billion again, insurers are helping policyholders mitigate risk
Databricks raises capital at $134 billion valuation in latest funding round
Pfizer’s modest 2026 outlook shows its big investments will take time to pay off