]> wagnertech.de Git - timetracker.git/blobdiff - mobile/login.php
Replaced boolval calls to cast to bool so that the app works with PHP 5.2.
[timetracker.git] / mobile / login.php
index 7e5d871973b18e4e5b270f58c4c78679d5d89970..a0747deb8a7af758da5302b6f8029d722d19a790 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'));