/** * 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); }
/** * 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); }
/** */ public function exists($userId) { return $this->_base->exists($userId); }