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

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

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:
Israel says it has killed Iran’s intelligence minister in third assassination in two days
Iran war poses challenges to high-margin Middle East car market
Alternatives to Outlook, Gmail and AOL for a web-based Email Provider?
What is a film seminar
Social Media Poster - Auto-share your Q2A content everywhere
Book: Mistborn: The Final Empire
Paradise: Jane
Asia markets track Wall Street losses as Iran war fuels energy worries; BOJ rate decision on deck
Vice President Vance to meet with oil industry as White House plans more actions to address fuel prices
Bain Capital taps buyer interest for Bridge Data Centres, offering up to 70% stake, sources say