- elseif ($request->getParameter('onBehalfGroup')) {
- if($user->can('manage_subgroups')) {
- unset($_SESSION['behalf_group_id']);
- unset($_SESSION['behalf_group_name']);
-
- if($on_behalf_group_id != $user->group_id) {
- $_SESSION['behalf_group_id'] = $on_behalf_group_id;
- $_SESSION['behalf_group_name'] = ttGroupHelper::getGroupName($on_behalf_group_id);
- }
- header('Location: time.php');
- exit();
- }
- }
- elseif ($request->getParameter('onBehalfUser')) {
- if($user->can('track_time')) {
- unset($_SESSION['behalf_id']);
- unset($_SESSION['behalf_name']);
-
- if($on_behalf_id != $user->id) {
- $_SESSION['behalf_id'] = $on_behalf_id;
- $_SESSION['behalf_name'] = ttUserHelper::getUserName($on_behalf_id);
- }
- header('Location: time.php');
- exit();
- }
- }