From: Nik Okuntseff Date: Fri, 25 Mar 2016 17:33:37 +0000 (-0700) Subject: Fixed a redirect for different user roles after password change. X-Git-Tag: timetracker_1.19-1~1782 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=98907514962d51214461614c73087dc9f0f6c2f7;p=timetracker.git Fixed a redirect for different user roles after password change. --- diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index d4174240..eeab7899 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.9.19.3441 | Copyright © Anuko | +  Anuko Time Tracker 1.9.19.3442 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/login.php b/login.php index 19b88eac..7f55853a 100644 --- a/login.php +++ b/login.php @@ -65,16 +65,14 @@ if ($request->isPost()) { // Redirect, depending on user role. if ($user->isAdmin()) { header('Location: admin_teams.php'); - exit(); } else if ($user->isClient()) { header('Location: reports.php'); - exit(); } else { header('Location: time.php'); - exit(); } + exit(); } else $err->add($i18n->getKey('error.auth')); } diff --git a/password_change.php b/password_change.php index f07b8b61..62cc962d 100644 --- a/password_change.php +++ b/password_change.php @@ -81,7 +81,16 @@ if ($request->isPost()) { if ($auth->doLogin($user->login, $cl_password1)) { setcookie('tt_login', $user->login, time() + COOKIE_EXPIRE, '/'); - header('Location: time.php'); + // Redirect, depending on user role. + if ($user->isAdmin()) { + header('Location: admin_teams.php'); + } + else if ($user->isClient()) { + header('Location: reports.php'); + } + else { + header('Location: time.php'); + } exit(); } else { $err->add($i18n->getKey('error.auth'));