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

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

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:
FDA approves psoriasis pill from J&J that rivals shots Tremfya, Skyrizi
Amazon says U.S. Postal Service 'walked away at the eleventh hour' in negotiations
Thursday's big stock stories: What’s likely to move the market in the next trading session
Which credit card should you pay off first? 5 tips to help you decide
How to turn leaves into ornaments
Odds of a Fed rate hike by June are now higher than the chances for a rate cut
Top Chef: Puckerbutt
Trump waives Jones Act shipping rules for 60 days to steady oil market
Here are the five key takeaways from this week's Fed meeting
Vice President Vance to meet with oil industry as White House plans more actions to address fuel prices