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

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

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:
Small furniture retailers face existential tariff threat, regardless of Supreme Court ruling
What a Supreme Court tariff ruling may mean for your money
How do you do, fellow Canadian
Movie: Save the Green Planet!
Labor Secretary's husband barred from HQ after claims he sexually assaulted women there: MS Now
Nvidia is in talks to invest up to $30 billion in OpenAI, source says
OpenAI and Anthropic’s rivalry on display as CEOs avoid holding hands at AI summit
Epstein would 'name drop' Trump, Les Wexner says in deposition video
Friday's big stock stories: What’s likely to move the market in the next trading session
U.S. trade deficit totaled $901 billion in 2025, barely budging despite Trump's tariffs