diff options
| author | Nathan <exreaction@phpbb.com> | 2012-07-10 16:07:12 -0500 |
|---|---|---|
| committer | Nathan <exreaction@phpbb.com> | 2012-07-10 16:07:12 -0500 |
| commit | 33852e6251cf9eea29efde4aebdd64500b7e7c2b (patch) | |
| tree | 4bfdb0c0d10425637353eb9f82623a8b8a8d2168 /phpBB/memberlist.php | |
| parent | 07b9c1e2fdeeab5d394c0b166fb0a6488b049cd1 (diff) | |
| download | forums-33852e6251cf9eea29efde4aebdd64500b7e7c2b.tar forums-33852e6251cf9eea29efde4aebdd64500b7e7c2b.tar.gz forums-33852e6251cf9eea29efde4aebdd64500b7e7c2b.tar.bz2 forums-33852e6251cf9eea29efde4aebdd64500b7e7c2b.tar.xz forums-33852e6251cf9eea29efde4aebdd64500b7e7c2b.zip | |
[ticket/8323] Correct PM notification settings (only notify those who can receive them)
Also correcting the way it was setup for users to be able to receive PMs (do not allow administrators/moderators to send to banned, inactive, or non-standard users, that just doesn't make sense)
PHPBB3-8323
Diffstat (limited to 'phpBB/memberlist.php')
| -rw-r--r-- | phpBB/memberlist.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index c76d242df4..f468d8543a 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -1696,7 +1696,13 @@ function show_profile($data, $user_notes_enabled = false, $warn_user_enabled = f } // Can this user receive a Private Message? - $can_receive_pm = ($data['user_type'] <> USER_IGNORE && $data['user_type'] <> USER_INACTIVE && (($auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_')) || ($data['user_allow_pm'] && sizeof($auth->acl_get_list($user_id, 'u_readpm')) && !sizeof(phpbb_get_banned_user_ids($user_id, false))))) ? true : false; + $can_receive_pm = ( + $data['user_type'] != USER_IGNORE && // They must be a "normal" user + $data['user_type'] != USER_INACTIVE && // They must not be deactivated by the administrator + sizeof($auth->acl_get_list($user_id, 'u_readpm')) && // They must be able to read PMs + !sizeof(phpbb_get_banned_user_ids($user_id, false)) && // They must not be permanently banned + (($auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_')) || $data['user_allow_pm']) // They must allow users to contact via PM + ) ? true : false; // Dump it out to the template return array( |
