Work in progress switching to ttUser::isPluginEnabled().
[timetracker.git] / login.php
index 19b88ea..d578ae9 100644 (file)
--- a/login.php
+++ b/login.php
@@ -65,16 +65,12 @@ if ($request->isPost()) {
       // Redirect, depending on user role.
       if ($user->isAdmin()) {
         header('Location: admin_teams.php');
-        exit();
-      }
-      else if ($user->isClient()) {
+      } elseif ($user->isClient()) {
         header('Location: reports.php');
-        exit();
-      }
-      else {
+      } else {
         header('Location: time.php');
-        exit();
       }
+      exit();
     } else
       $err->add($i18n->getKey('error.auth'));
   }