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

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

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:
U.S. attacks Venezuela, captures Maduro and his wife; AG Bondi says charges include 'Narco-Terrorism'
Anthropic's 'do more with less' bet has kept it at the AI frontier, co-founder Amodei tells CNBC
After a bruising 2025, the Fed faces another slew of challenges in the year ahead
Bank of America expects a boost in dividends in 2026. These stocks have payouts that beat the market
China’s BYD overtakes Tesla as world’s top EV seller for the first time
Chip stocks rally to start 2026 after third-straight winning year
South Korea's Lee begins China state visit after North fires missiles
Airlines restore Caribbean flights after U.S. lifts airspace restrictions tied to Venezuela strikes
Lucid increases EV deliveries by 55% in 2025, meets lowered guidance
2026 tax brackets could mean a slightly bigger paycheck — what to expect