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

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

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:
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
DeepMind CEO is talking to Google CEO 'every day' as lab ramps up competition with OpenAI
OpenAI tells investors to brace for 'deliberately outlandish' claims from Musk ahead of trial
Trump accepts Nobel medal from Venezuelan opposition leader Machado
Japan's Mitsubishi to acquire shale gas assets in U.S. for $7.5 billion
Here are Needham's top picks for 2026
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
'Markets are callous': Why stocks aren't fazed by Iran, Greenland or Venezuela