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

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

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:
Asset manager Janus Henderson gets bought by Trian, General Catalyst for $7.4 billion
Mercedes-Benz agrees to $149.6 million settlement with U.S. states over excess diesel emissions
Jim Cramer is encouraged by Nvidia-China reports and dismisses a Honeywell charge
Paramount guarantees Larry Ellison backing in amended WBD bid
Brick trophies, a life-size pink Cadillac and a team sponsorship: Why Lego is going all in on F1
Supplements in your stocking: Why wellness gifts are gaining steam for the holidays and beyond
Alphabet to acquire data center and energy infrastructure company Intersect
The blowout AI trades that surprised Wall Street in 2025
Christmas celebrations muted at Bondi as Australians grieve after deadly shooting
Crypto exchange Kraken plans to offer prediction markets in 2026: CNBC Crypto World