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

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

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:
The top 10 jobs in the U.S. for 2026 all pay $100,000 or more, according to Indeed
Buy this social media stock with lots of upside thanks to AI, says Evercore ISI
More drivers have $1,000-plus car loan payments. Here's what buyers can expect in 2026
Intel and AMD get upgrades at KeyBanc thanks to strong server demand for AI
Boeing secures tentative labor deal with former Spirit AeroSystems workers
Rates have dropped to the lowest point in years — here are the best lenders for refinancing your mortgage
Trump accepts Nobel medal from Venezuelan opposition leader Machado
Japan's Mitsubishi to acquire shale gas assets in U.S. for $7.5 billion
Stocks making the biggest moves premarket: PNC, ImmunityBio, Coupang & more
Russia says it's monitoring Trump's 'extraordinary' push to take over Greenland