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

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

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:
The private space race is spurring a luxury hotel land grab for Florida oceanfront property
2-year Treasury yield rockets higher as many Fed officials signal possible hike this year
Widow's Bay: We Hope You Enjoyed Your Time
Mr. Queen: Full season
Trump and Iran's President Pezeshkian sign memorandum aimed to end war
Unconventional lifestyle people: what those assets do?
Here are the five big takeaways from Kevin Warsh's first meeting as Fed chairman
Oil falls as International Energy Agency forecasts supply glut next year after U.S.-Iran deal
Jeffrey Gundlach says Fed's Warsh is not going to be the 'easy money' chairman many hoped for
How Elon Musk's second-in-command Gwynne Shotwell helped turn SpaceX into an IPO giant