From a0b59500fc36111e7931ba844b4f64e48867ffe5 Mon Sep 17 00:00:00 2001 From: ghost Date: Sat, 7 Oct 2023 23:31:12 +0300 Subject: [PATCH] set initial user as moderator --- src/Service/UserService.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Service/UserService.php b/src/Service/UserService.php index c4ade42..0b8f52b 100644 --- a/src/Service/UserService.php +++ b/src/Service/UserService.php @@ -49,6 +49,13 @@ class UserService $this->save($user); + // Set initial user as moderator + if (1 === $user->getId()) + { + $user->setModerator(true); + $this->save($user); + } + // Return user data return $user; }