示例#1
0
 /**
  * The logout action
  * Perform logout, redirect user to main-page
  */
 public function getLogout()
 {
     $this->app->log->debug(get_class($this) . '->getLogout()');
     LoginModel::logout();
     $this->redirectHome();
     exit;
 }
 /**
  * Detects if there is concurrent session (i.e. another user logged in with the same current user credentials),
  * If so, then logout.
  *
  */
 public function checkSessionConcurrency()
 {
     if (Session::userIsLoggedIn()) {
         // $this->app->log->debug("userIsLoggedIn");
         if (Session::isConcurrentSessionExists()) {
             // TODO: log something...
             LoginModel::logout();
             $this->redirectHome();
             exit;
         }
     }
 }