From d14aed0819f2314ab0da1787aa7228025a6a024c Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Thu, 5 Sep 2013 13:59:24 -0500 Subject: [PATCH] [ticket/8323] Cache auth request PHPBB3-8323 --- phpBB/includes/ucp/ucp_pm_compose.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index a1b2bb61f9..9a6aa3f7a0 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -1229,7 +1229,8 @@ function handle_message_list_actions(&$address_list, &$error, $remove_u, $remove AND (user_type = ' . USER_INACTIVE . ' AND user_inactive_reason = ' . INACTIVE_MANUAL . ')'; - if (!$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_')) + $can_ignore_allow_pm = ($auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_')); + if (!$can_ignore_allow_pm) { $sql .= ' OR user_allow_pm = 0'; } @@ -1239,7 +1240,7 @@ function handle_message_list_actions(&$address_list, &$error, $remove_u, $remove $removed_no_pm = $removed_no_permission = false; while ($row = $db->sql_fetchrow($result)) { - if (!$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_') && !$row['user_allow_pm']) + if (!$can_ignore_allow_pm && !$row['user_allow_pm']) { $removed_no_pm = true; }