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

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

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
Does it really matter who ends up owning Warner Bros.? Media exec Tom Rogers breaks it down
Bank of America boosts Micron price target, sees upside driven by tight memory supply
Pentagon is embracing Musk's Grok AI chatbot as it draws global outcry
Stocks making the biggest moves premarket: L3Harris, JPMorgan, Delta, Intel, AMD and more
Why Jim Cramer is bullish on Goldman Sachs and Morgan Stanley
Boeing secures tentative labor deal with former Spirit AeroSystems workers
Australia banned social media for under 16s a month ago — here's how it's going
U.S. threats of a Greenland takeover spark talk of trade wars
Venezuela oil fetching 30% higher price, U.S. energy chief says, after first sale worth $500 million