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

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

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:
Lanterns: Bad Optics
Trump, Xi seek trade stability and deals, but AI, tariffs and Iran loom large. What to watch
Trump slams Iran and Cuba, defends AI growth and recounts record in UN speech
What should I do now if I may loose my hearing in 15 years?
Good hand-sewing projects for a not-very-crafty ten year old?
Iran reportedly says it can reopen Strait of Hormuz within 7 days if U.S. eases military pressure
OpenAI proposes development of global AI standards to guide alignment, RSI
September surge or October offload? Jobs experts weigh in on this fall’s hiring trends
Kalshi asks CFTC to allow margin trading on its platform, letting users buy with borrowed funds
Answered: Pulse 2026 Pro - The Ultra-Modern Q2A Theme