Control & Promote administrator status via a method rather than a prop

This commit is contained in:
Bubka
2024-01-26 18:14:02 +01:00
parent d96c943927
commit 8b397750e8
8 changed files with 43 additions and 12 deletions

View File

@@ -63,7 +63,7 @@ class RemoteUserProvider implements UserProvider
Log::info(sprintf('Remote user %s created with email address %s', var_export($user->name, true), var_export($user->email, true)));
if (User::count() === 1) {
$user->is_admin = true;
$user->promoteToAdministrator();
$user->save();
}
} else {