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

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

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:
Bank of America is betting on these stocks, including one Big Tech laggard, in the first quarter of 2026
'Queen City' Charlotte was the king of the stock market in 2025
SpaceX stock debut is the big market event of 2026. Why Musk's venture could be biggest IPO ever
These are the most overbought and oversold stocks in the S&P 500 as 2026 begins
Tesla reports 418,227 deliveries for the fourth quarter, down 16%
Watch Trump's full comments following the U.S. strike against Venezuela
Estate planning helps 'forestall bad outcomes,' author says — you need some key documents even at age 18
Answered: how to delete space between menu and main content?
2026 tax brackets could mean a slightly bigger paycheck — what to expect
Maduro overthrow could pave the way for these U.S. oil companies to recover assets seized by Venezuela