X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/2178ec6d4efd6cad07b8f137415ecec207efcdad..f9e5e8956921839e6742a85db2067ddc6ef5b2b8:/users.php diff --git a/users.php b/users.php index 8787844b..d19ba7de 100644 --- a/users.php +++ b/users.php @@ -28,15 +28,15 @@ require_once('initialize.php'); import('form.Form'); -import('ttTeamHelper'); import('ttTimeHelper'); import('ttRoleHelper'); -// Access check. +// Access checks. if (!(ttAccessAllowed('view_users') || ttAccessAllowed('manage_users'))) { header('Location: access_denied.php'); exit(); } +// End of access checks. // Prepare a list of active users. if ($user->can('view_users')) @@ -51,12 +51,13 @@ if($user->can('manage_users')) { $inactive_users = $user->getUsers($options); } -// Check if the team is set to show indicators for uncompleted time entries. -if ($user->uncompleted_indicators) { +$uncompleted_indicators = $user->getConfigOption('uncompleted_indicators'); +if ($uncompleted_indicators) { // Check each active user if they have an uncompleted time entry. foreach ($active_users as $key => $user) { $active_users[$key]['has_uncompleted_entry'] = (bool) ttTimeHelper::getUncompleted($user['id']); } + $smarty->assign('uncompleted_indicators', true); } $smarty->assign('active_users', $active_users);