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

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

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:
One year on from the UK's grand AI plan: Has its infrastructure buildout been a success?
How to find the log in page in q2amarket.com
Virginia offshore wind developer sues over Trump administration order halting projects
New NASA boss Isaacman says U.S. will return to the moon within Trump's term
Google is rolling out a new feature allowing users to change their Gmail address
Half of Americans expect holiday debt — 6 steps to recover fast in the new year
Play on or game over? A look back at 2025 for the video game industry
Here’s where you can still snag 4% yields on idle cash
These are the most overbought S&P 500 stocks as 2026 approaches
Russian drones, missiles pound Ukraine ahead of Trump-Zelenskyy meeting