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

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

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:
Delta CEO sees record earnings in reach again thanks to high-end travel demand
RV buyers are trading up and this stock is set to benefit, Loop Capital says
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
BlackRock's earnings pass our test with flying colors. What about 2026?
DeepMind CEO is talking to Google CEO 'every day' as lab ramps up competition with OpenAI
Goldman Sachs CEO is looking at how the Wall Street bank can get involved in prediction markets
TSMC is set to expand its $165 billion U.S. investment — here’s what we know
Russia says it's monitoring Trump's 'extraordinary' push to take over Greenland
Amazon threatens 'drastic' action after Saks bankruptcy, says $475M stake is now worthless