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

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

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:
Inflation fears on the rise as one-year outlook in Fed survey hits highest level since May 2023
Anthropic will be 'most ridiculous IPO' of year, analyst says
Inside India newsletter: Food crisis, economic shock ahead as India braces for El Niño
Online, self paced computer skills class for TOTAL beginner?
Stargate SG-1: Abyss Rewatch
Slow Horses: Lost and Found
Movie: Resident Evil: Afterlife
Lanterns: Dirt and Stars
America shut out Chinese EVs. Britain welcomed them — and now faces a difficult choice
Samsung forecasts record third-quarter profit of $80 billion as AI boom fuels chip demand