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

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

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:
Denmark to summon U.S. ambassador as Trump's Greenland special envoy appointment stirs tensions
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
A look at two industrial names on our Best Stocks list, including one that's a buy right now
The blowout AI trades that surprised Wall Street in 2025
It's too late for some last-minute tax moves — but these can be tackled with days to go in 2025
Christmas celebrations muted at Bondi as Australians grieve after deadly shooting
Here are 3 insurance options to nix in the new year
Affordability is a buzzword right now — these charts show why
Exclusive: Nvidia buying AI chip startup Groq's assets for about $20 billion in largest deal on record