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

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

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:
Meta wins FTC antitrust trial that focused on WhatsApp, Instagram
Blip, dip, pullback or the beginning of the end? Global investors weigh in on stock sell-off
This buy now, pay later stock is getting crushed. How to capitalize on the downside move with options
Walmart in talks to acquire Israeli-founded startup to combat scams, counterfeits
Jim Cramer's top 10 things to watch in the stock market Wednesday
Trump calls for ABC's license to be revoked after reporter asks about Jeffrey Epstein files
Don't pass up 'free money' during open enrollment, says benefits expert—how to choose FSA and HSA contributions
Klimt painting sells for record $236 million, reviving hopes for the art market
TJ Maxx and Marshalls owner hikes outlook as CEO says holiday season is off to a 'strong start'
Blue Owl calls off merger of its two private-credit funds after announcement rattles stock