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

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

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:
Polymarket launches trading of heavily leveraged 'perps' contracts
How Warsh can give Trump rate cuts, keep Fed independent, and make the market happy
Worried about rising gas prices? These 5 credit cards save on transit, rideshare and more
Rep. Sheila Cherfilus-McCormick resigns, third House member to quit this month
Gates Foundation reviewing Jeffrey Epstein ties, will slash 20% of staff, WSJ reports
Marvell stands to gain from boosted Amazon-Anthropic partnership
Is it okay to leave the toilet seat up in a shared office space?
Movie: The Stranger
Movie: The Blue Caftan
Book: Purgatorio: Canto 14