예제 #1
0
 /**
  * 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;
         }
     }
 }
예제 #2
0
파일: Login.php 프로젝트: iubar/iubar-login
 /**
  * Returns the current state of the user's login
  *
  * @return bool user's login status
  */
 public static function isUserLoggedIn()
 {
     return Session::userIsLoggedIn();
 }