Soem refactoring to keep things a bit more consistent.
[timetracker.git] / mobile / login.php
index 7e5d871..a0747de 100644 (file)
@@ -69,20 +69,16 @@ 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'));
   }
-} // POST
+} // isPost
 
 if(!isTrue(MULTITEAM_MODE) && !ttTeamHelper::getTeams())
   $err->add($i18n->getKey('error.no_teams'));