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

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

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:
Europe has rare earths but, for now, it's at China's mercy like everyone else
Meta wins FTC antitrust trial that focused on WhatsApp, Instagram
‘Palooza in Cryptoland:’ Bitwise predicts fresh ETF surge despite rough stretch for digital assets
Best data removal services of 2025
Blip, dip, pullback or the beginning of the end? Global investors weigh in on stock sell-off
From $1 trillion spending to F-35s, U.S.-Saudi pledges aren't done deals yet
Klimt painting sells for record $236 million, reviving hopes for the art market
Lowe's beats on quarterly sales, but lowers full-year profit forecast amid economic uncertainty
The stock market is counting on Nvidia. Here are the 'whisper numbers' the chip giant must deliver
Blue Owl calls off merger of its two private-credit funds after announcement rattles stock