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

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

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:
Novo Nordisk moves next-gen drug amycretin to late-stage diabetes trial after promising data
Multifamily housing leads CRE bid competition in October
Applying to jobs from Thanksgiving to New Year's isn't pointless, experts say: 'You actually have more opportunity to stand out'
Abortion pill makers brace for restrictions a year after Trump's election
Best Buy hikes sales forecast as shoppers upgrade tech, splurge on devices
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
Musk's xAI to close $15 billion funding round in December: sources
Bessent says there's a 'very good chance' Trump names new Fed chair before Christmas
Consumer confidence hits lowest point since April as job worries grow