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

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

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:
Abel takes over for Buffett in less than two weeks. Wall Street has some advice for new Berkshire CEO
Nine of the largest pharma companies ink deals with Trump to lower drug prices
Zelenskyy favors U.S. proposal of three-way talks if it produces results in ending war with Russia
U.S. seizes oil tanker off the coast of Venezuela
U.S. hits ISIS in Syria with large retaliatory strikes, officials say
Epstein files: A number of documents, including Trump photo, reportedly removed from DOJ release site
Lucid's big SUV arrives with high expectations, and big risks
Jim Cramer is encouraged by Nvidia-China reports and dismisses a Honeywell charge
Waiting until January to make this move could trim up to $2,000 off your taxable income—about 90% of filers could benefit
Gold and silver prices soar to new highs as the yellow metal reemerges as a hedge