exists() 공개 메소드

Checks if $userId exists in the system.
public exists ( string $userId ) : boolean
$userId string User ID for which to check
리턴 boolean Whether or not $userId already exists.
예제 #1
0
 /**
  * Returns a specific principal, specified by it's path.
  *
  * @param string $path
  * @return array
  */
 public function getPrincipalByPath($path)
 {
     list($prefix, $user) = DAV\URLUtil::splitPath($path);
     if ($prefix != 'principals') {
         throw new DAV\Exception\NotFound('Invalid principal prefix path ' . $prefix);
     }
     if ($this->_auth->hasCapability('list') && !$this->_auth->exists($user) && $user != '-system-') {
         throw new DAV\Exception\NotFound('User ' . $user . ' does not exist');
     }
     return $this->_getUserInfo($user);
 }
예제 #2
0
파일: Application.php 프로젝트: horde/horde
 /**
  * Checks if a user ID exists in the system.
  *
  * @param string $userId  User ID to check.
  *
  * @return boolean  Whether or not the user ID already exists.
  */
 public function exists($userId)
 {
     if ($this->_base) {
         return $this->_base->exists($userId);
     }
     return $this->hasCapability('exists') ? $GLOBALS['registry']->callAppMethod($this->_app, 'authUserExists', array('args' => array($userId))) : parent::exists($userId);
 }
예제 #3
0
 /**
  */
 public function exists($userId)
 {
     return $this->_base->exists($userId);
 }