コード例 #1
0
ファイル: User.php プロジェクト: trejjam/authorization
 public function logout($clearIdentity = FALSE)
 {
     $identity = $this->storage->getIdentity();
     if (!is_null($identity)) {
         $this->identityHash->setAction($identity->getId(), IdentityHash::ACTION_DESTROYED, isset($identity->hash) ? $identity->hash : NULL);
     }
     parent::logout($clearIdentity);
 }
コード例 #2
0
ファイル: Manager.php プロジェクト: trejjam/authorization
 /**
  * @param string $username
  * @param string $type [username|id]
  * @throws Trejjam\Authorization\User\ManagerException
  */
 public function setUpdated($username, $type = 'username')
 {
     $user = $this->getUser($username, $type);
     if ($user) {
         $this->identityHash->setAction($user, IdentityHash::ACTION_RELOAD);
     } else {
         //this may not happen
         throw new Trejjam\Authorization\User\ManagerException();
     }
 }