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

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

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:
Goldman Sachs says this audio streaming giant is primed to rally nearly 30%
Lyft president Kristin Sverchek to exit on Aug. 20
Lifestyle changes for pre-diabetes
Places to buy jigsaw puzzles NOT designed by AI?
House of the Dragon: Smallfolk Show Only
Wall Street analysts see more downside ahead for Tesla as latest earnings report lacks 'razzle dazzle'
AT&T beats estimates for subscriber additions on demand for higher-priced plans
Elon Musk wants Tesla to invest $5 billion into his newest startup, xAI — if shareholders approve
Using options to manage risk heading into Microsoft earnings next week
Recap: Harris neck and neck with Trump in polls, as Wisconsin rally draws 3,000 supporters