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

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

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:
Apple's elevation of silicon head Johny Srouji signals sprint to build in-house chips for all devices
United Airlines slashes 2026 forecast as fuel costs surge
Jim Cramer says these stocks show why you need to trade on fundamentals, not fear
Gates Foundation reviewing Jeffrey Epstein ties, will slash 20% of staff, WSJ reports
Looking for a good microwave or microwave/air fryer combo
Google recaptcha V3 here
Hormuz is just a ‘dry run’ if China and U.S. go to war in the Pacific, Singapore foreign minister warns
SpaceX says it can buy Cursor later this year for $60 billion or pay $10 billion for 'our work together'
Apple incoming CEO John Ternus faces a defining challenge: Fixing the company's AI strategy
Trump says 'I'll remember' companies that don’t seek tariff refunds