diff --git a/src/Controller/LoginController.php b/src/Controller/LoginController.php index a858949..054d49c 100644 --- a/src/Controller/LoginController.php +++ b/src/Controller/LoginController.php @@ -159,7 +159,7 @@ class LoginController return new JsonContent(['success' => true]); } - $user = $this->userRepository->getByEmail(\Container::$request->post('email')); + $user = $this->userRepository->getByEmailOrUsername(\Container::$request->post('email')); if ($user === null) { if (strlen(\Container::$request->post('password')) < 6) { @@ -190,7 +190,7 @@ class LoginController return new JsonContent([ 'error' => [ - 'errorText' => 'User found with the given email address, but the account is not activated. ' . + 'errorText' => 'User found with the given email address / username, but the account is not activated. ' . 'Please check your email and click on the activation link!' ] ]); @@ -485,12 +485,12 @@ class LoginController } } - $user = $this->userRepository->getByEmail(\Container::$request->post('email')); + $user = $this->userRepository->getByEmailOrUsername(\Container::$request->post('email')); if ($user === null) { return new JsonContent([ 'error' => [ - 'errorText' => 'No user found with the given email address. You can sign up!' + 'errorText' => 'No user found with the given email address / username. You can sign up!' ] ]); } @@ -500,7 +500,7 @@ class LoginController return new JsonContent([ 'error' => [ - 'errorText' => 'User found with the given email address, but the account is not activated. ' . + 'errorText' => 'User found with the given email address / username, but the account is not activated. ' . 'Please check your email and click on the activation link!' ] ]); diff --git a/views/login/login.php b/views/login/login.php index ddc5ca9..f0b8b61 100644 --- a/views/login/login.php +++ b/views/login/login.php @@ -4,7 +4,7 @@

Login

- +

diff --git a/views/login/password_reset_request.php b/views/login/password_reset_request.php index 74e0210..9b732d1 100644 --- a/views/login/password_reset_request.php +++ b/views/login/password_reset_request.php @@ -6,7 +6,7 @@

Request password reset

- +