'createUser', self::SET_PASSWORD => 'setPassword', self::CHECK_PASSWORD => 'checkPassword', self::GET_HOME => 'getHome', self::GET_DISPLAYNAME => 'getDisplayName', self::SET_DISPLAYNAME => 'setDisplayName', self::PROVIDE_AVATAR => 'canChangeAvatar', self::COUNT_USERS => 'countUsers', ]; /** * Get all supported actions * @return int bitwise-or'ed actions * * Returns the supported actions as int to be * compared with self::CREATE_USER etc. */ public function getSupportedActions() { $actions = 0; foreach ($this->possibleActions as $action => $methodName) { if (method_exists($this, $methodName)) { $actions |= $action; } } return $actions; } public function implementsActions($actions) { return (bool)($this->getSupportedActions() & $actions); } public function deleteUser($uid) { return false; } public function getUsers($search = '', $limit = null, $offset = null) { return []; } public function userExists($uid) { return false; } /** * get the user's home directory * @param string $uid the username * @return boolean */ public function getHome($uid) { return false; } public function getDisplayName($uid) { return $uid; } public function getDisplayNames($search = '', $limit = null, $offset = null) { $displayNames = []; $users = $this->getUsers($search, $limit, $offset); foreach ($users as $user) { $displayNames[$user] = $user; } return $displayNames; } public function hasUserListings() { return false; } }