config['users'][$username]['password-hash'] ?? null; if (!isset($hash)) { return false; } return password_verify($password, $hash); } public function userExists(string $username): bool { return isset($this->config['users'][$username]); } public function userGroups(string $username): array { $gstr = $this->config['users'][$username]['groups'] ?? ''; $groups = []; for ($ng = strtok($gstr, ' '); $ng !== false; $ng = strtok(' ')) $groups[] = $ng; return $groups; } public function userDisplayName(string $username): ?string { return $this->config['users'][$username]['name'] ?? null; } public function userEmailAddress(string $username): ?string { return $this->config['users'][$username]['email'] ?? null; } }