From a2c36f10b3f63348cfa9f2e242027c1cdb8893f2 Mon Sep 17 00:00:00 2001 From: kenjis Date: Sun, 8 Sep 2024 11:51:24 +0900 Subject: [PATCH] refactor: we don't need to use getUserEntity() --- src/Controllers/RegisterController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Controllers/RegisterController.php b/src/Controllers/RegisterController.php index 6b34f0252..b85e90082 100644 --- a/src/Controllers/RegisterController.php +++ b/src/Controllers/RegisterController.php @@ -103,8 +103,7 @@ public function registerAction(): RedirectResponse // Save the user $allowedPostFields = array_keys($rules); - $user = $this->getUserEntity(); - $user->fill($this->request->getPost($allowedPostFields)); + $user = $users->createNewUser($this->request->getPost($allowedPostFields)); // Workaround for email only registration/login if ($user->username === null) { @@ -160,6 +159,8 @@ protected function getUserProvider(): UserModel /** * Returns the Entity class that should be used + * + * @deprecated 1.2.0 No longer used. */ protected function getUserEntity(): User {