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

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

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:
Costco issues a lukewarm quarter, but delivers on the metric that matters most
Snowflake surges 36% for best day ever on AI frenzy, fueling software rally
I was at the exclusive launch of Ferrari's new EV that sent the stock tumbling. But there may be light at the end of the tunnel
New '60 Minutes' head Nick Bilton says Paramount's CBS News hired him to pivot the show before ratings decline
In search of really, really nice (US-sized) composition notebooks
Hacks: Season 5
Movie: Oedipus Rex
Michael Dell courted Trump early. His company has reaped rewards
U.S. government is reportedly set to invest in drone industry. These are Wall Street’s favorite plays
Americans’ savings rate falls to lowest level since 2022 as inflation outpaces paychecks