From 96387025da63025894f6259f7eebed0fc6fc53ac Mon Sep 17 00:00:00 2001 From: winter Sparkles Date: Sun, 9 Aug 2026 15:44:18 +0100 Subject: implement the rest of login process incl. cookie redirects and 'next' --- Psso/AuthProvider/ConfigFile.php | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'Psso/AuthProvider') diff --git a/Psso/AuthProvider/ConfigFile.php b/Psso/AuthProvider/ConfigFile.php index 688c193..e9b45ce 100644 --- a/Psso/AuthProvider/ConfigFile.php +++ b/Psso/AuthProvider/ConfigFile.php @@ -1,9 +1,10 @@ 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; + } } -- cgit v1.3