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

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

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:
Iran war poses challenges to high-margin Middle East car market
JPMorgan Chase taps Dwyane Wade, Tom Brady for new athlete wealth management push
Looking for great books, essays and podcasts about fundraising?
Book: Mistborn: The Final Empire
Movie: Eyes Without a Face
Paradise: Jane
Special Event: The 98th Academy Awards, 2026
Oil jumps 4% as Iranian retaliatory strikes on Qatar’s key energy facility stoke supply worries
Trump waives Jones Act shipping rules for 60 days to steady oil market
A Labubu movie is on its way as Pop Mart expands the iconic toy franchise