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

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

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:
How Trump’s latest tariff moves hand India an edge over rival Asian exporters
Anthropic's stock has been a clunker post-IPO. Why that matters for the AI trade
SpaceX, Musk pledge to donate a share each to active Trump Accounts
Robots could be doing household chores in just 1-2 years, Chinese EV firm says
Moving: Korean TV: Moving
Movie: A Talent for Murder
The Diplomat: Phony Negroni
Movie: Paper Tiger
SpaceX shares jump on alternative trading platform after Musk says he will expand on Trump Account share donations
Private markets are more accessible than ever for investors. Getting out is another matter