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

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

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:
Russia and Ukraine agree local truce to allow repairs at Europe’s largest nuclear power plant
Where can I ask the MetaFilter board all my burning questions?
Trump Media in talks to spin off Truth Social from DJT into independent stock
Netflix ditches deal for Warner Bros. Discovery after Paramount’s offer is deemed superior
Core wholesale prices rose 0.8% in January, much more than expected
This obscure ETF may hold the key to whether the bull market lasts
Special Event: MetaFilter Board Town Hall
Gen Z is embracing the prenup, says family law attorney: ‘The taboo of divorces is long gone’
Trump angering MAHA with glyphosate order gives Democrats an opening
How high can oil and gas prices go because of the Iran war? Here are the scenarios