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

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

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:
Apple, Alphabet and Uber survived major founder transitions. Nvidia will be a harder test
This water technology stock is set to get a big boost from AI, says Wells Fargo
Nvidia scandal draws in Commerce Secretary Lutnick, who reportedly agrees to testify about China chip sales
This cybersecurity stock is down nearly 20% over the past month. KeyBanc says it's a buy
Estimation Olympics
Alternative to Amazon locker.
How can I add a custom meta description and title for each question page in Q2A for better SEO?
Movie: Superterranean
Stocks making the biggest moves premarket: Microsoft, Nvidia, Cerebras & more
‘We will sue them’: Canada threatens Stellantis as Trump trade war reshapes Jeep production plans