From 77e7a27c113cbf119a25f53663f60f0c5962c411 Mon Sep 17 00:00:00 2001 From: Oliver Schramm Date: Sun, 10 Sep 2017 12:50:36 +0200 Subject: [ticket/15267] Hide birthday list if permission wasn't granted PHPBB3-15267 --- phpBB/index.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'phpBB/index.php') diff --git a/phpBB/index.php b/phpBB/index.php index 83535b50af..4e37782206 100644 --- a/phpBB/index.php +++ b/phpBB/index.php @@ -123,8 +123,10 @@ $db->sql_freeresult($result); $legend = implode($user->lang['COMMA_SEPARATOR'], $legend); // Generate birthday list if required ... +$show_birthdays = ($config['load_birthdays'] && $config['allow_birthdays'] && $auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel')); + $birthdays = $birthday_list = array(); -if ($config['load_birthdays'] && $config['allow_birthdays'] && $auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel')) +if ($show_birthdays) { $time = $user->create_datetime(); $now = phpbb_gmgetdate($time->getTimestamp() + $time->getOffset()); @@ -215,7 +217,7 @@ $template->assign_vars(array( 'S_LOGIN_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login'), 'U_SEND_PASSWORD' => ($config['email_enable']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=sendpassword') : '', - 'S_DISPLAY_BIRTHDAY_LIST' => ($config['load_birthdays']) ? true : false, + 'S_DISPLAY_BIRTHDAY_LIST' => $show_birthdays, 'S_INDEX' => true, 'U_MARK_FORUMS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}index.$phpEx", 'hash=' . generate_link_hash('global') . '&mark=forums&mark_time=' . time()) : '', -- cgit v1.2.1