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

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

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:
Kylian Mbappé faces China backlash as sponsors cut ties over viral meme
Trump jokes $5,000 would buy 'a hamburger and maybe a small dessert' at Mar-a-Lago as cost of living looms over midterms
Indian investors rush to Nvidia, SpaceX, Apple as local trading apps roll out access to U.S. stocks
Amazon's anti-tokenmaxxing memo says engineers should be pickier about using AI
SK Hynix shares jump 11% after record quarterly profit, outperforming broader market
Neil Young sues Trump committee for $10M for playing 'Rockin' in the Free World' at rally
mouse/keyboard config via webpage - security concerns?
St. Louis Fed's Musalem: Another rate hike needed 'soon'
Chevron and Exxon hit all-time highs as refining profits soar in reaction to Iran and Ukraine wars
Movie: The Cycle