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

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

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:
Yum's Taco Bell removes select items, says no confirmed link to U.S. cyclosporiasis outbreak
Penpals for grown-ups?
Wednesday's big stock stories: What’s likely to move the market in the next trading session
Movie: Tokyo Gore Police
The AI boom just found two new winners: Goldman Sachs and JPMorgan Chase
Lucid dismisses report that it is weighing filing for bankruptcy or going private after shares plunge
Current and former employees sue Meta, alleging discrimination in using AI to conduct layoffs
United Airlines' new upsell: Keeping other travelers out of the middle seat
Johnson & Johnson has a chance to show it's more than just a rotation winner
BMO bank account bonuses: Get up to $1,500