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'))
$options = array('status'=>ACTIVE,'include_clients'=>true,'include_login'=>true,'include_role'=>true);
else /* if ($user->can('manage_users')) */
- $options = array('status'=>ACTIVE,'max_rank'=>$user->rank-1,'include_clients'=>true,'include_self'=>true,'self_first'=>true,'include_login'=>true,'include_role'=>true);
+ $options = array('status'=>ACTIVE,'max_rank'=>$user->rank-1,'include_clients'=>true,'include_self'=>true,'include_login'=>true,'include_role'=>true);
$active_users = $user->getUsers($options);
// Prepare a list of inactive users.
$inactive_users = $user->getUsers($options);
}
-// Check if the team is set to show indicators for uncompleted time entries.
+// Check if the group is set to show indicators for uncompleted time entries.
if ($user->uncompleted_indicators) {
// Check each active user if they have an uncompleted time entry.
foreach ($active_users as $key => $user) {