BcUtil::getLoginUserSessionKey PHP 메소드

getLoginUserSessionKey() 공개 정적인 메소드

ログインしているユーザーのセッションキーを取得
public static getLoginUserSessionKey ( ) : string
리턴 string
    public static function getLoginUserSessionKey()
    {
        list(, $sessionKey) = explode('.', BcAuthComponent::$sessionKey);
        return $sessionKey;
    }

Usage Example

예제 #1
0
파일: BcUtil.php 프로젝트: naow9y/basercms
 /**
  * ログインユーザーのデータを取得する
  * 
  * @return array
  */
 public static function loginUser()
 {
     $Session = new CakeSession();
     $sessionKey = BcUtil::getLoginUserSessionKey();
     $user = $Session->read('Auth.' . $sessionKey);
     if (!$user) {
         if (!empty($_SESSION['Auth'][$sessionKey])) {
             $user = $_SESSION['Auth'][$sessionKey];
         }
     }
     return $user;
 }
All Usage Examples Of BcUtil::getLoginUserSessionKey