X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/9339284bfdaba5a0c2a4e3c9fa000194a508d0bf..bdbf162130c02c6a5510205c7704ef7d5e8f22ea:/mobile/user_edit.php diff --git a/mobile/user_edit.php b/mobile/user_edit.php index 49781226..3baaf1e9 100644 --- a/mobile/user_edit.php +++ b/mobile/user_edit.php @@ -39,20 +39,13 @@ if (!ttAccessAllowed('manage_users')) { header('Location: access_denied.php'); exit(); } - -// Get user id we are editing from the request. $user_id = (int) $request->getParameter('id'); -// Get user details. -$user_details = ttUserHelper::getUserDetails($user_id); - -// Security checks. -if (!$user_details || // No details. - $user_details['rank'] > $user->rank || // User has a bigger rank. - ($user_details['rank'] == $user->rank && $user_details['id'] <> $user->id) // Same rank but not us. - ) { +$user_details = $user->getUser($user_id); +if (!$user_details) { header('Location: access_denied.php'); exit(); } +// End of access checks. if ($user->isPluginEnabled('cl')) $clients = ttTeamHelper::getActiveClients($user->team_id);