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

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

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:
Border Patrol agent shoots 2 people in Portland, day after ICE agent kills Minneapolis woman
Rolls-Royce has hit a record high every trading day of 2026. Here's why
How IMAX crushed other theater stocks in 2025
First 2026 Social Security payments bring a bigger check in January. What beneficiaries can expect
Lockheed Martin is attractively valued to start the year, says Truist
Meta signs nuclear energy deals to power Prometheus AI supercluster
Trump to meet with oil executives at White House. What we know about U.S. plans for Venezuela
Trump will use other tariff authorities to get to 'same place' if Supreme Court rules against him: Hassett
Trump suggests U.S. military will hit cartels on ‘land’ in Mexico
Amazon Pharmacy starts offering Novo Nordisk's Wegovy weight-loss pill