Skip to content

Commit

Permalink
refactor: we don't need to use getUserEntity()
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Sep 8, 2024
1 parent 20ab4a5 commit a2c36f1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Controllers/RegisterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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
{
Expand Down

0 comments on commit a2c36f1

Please sign in to comment.