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

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

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:
Fed still expects to cut rates once this year despite spiking oil prices
Iran war poses challenges to high-margin Middle East car market
What are ways I can enjoy San Francisco even though I dislike it?
Help me understand tax on a brokerage account
Services that will pick up and ship item?
Social Media Poster - Auto-share your Q2A content everywhere
Movie: War Machine
Movie: Within the Pines
Oil jumps 4% as Iranian retaliatory strikes on Qatar’s key energy facility stoke supply worries
Here are the five key takeaways from this week's Fed meeting