Skip to content

Commit

Permalink
fix(log in): remove previous errors to output successful response
Browse files Browse the repository at this point in the history
This is similar to the fix that closed #13.
  • Loading branch information
KennethTrecy committed Nov 1, 2023
1 parent 058c200 commit 07e8b85
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/Controllers/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ class LoginController extends BaseLoginController {
public function customLoginAction(): ResponseInterface {
$session = session();

// Remove the following keys to prevent log in errors
$session->remove("errors");

$current_user_id = $session->get("user.id", null);
if (!is_null($current_user_id)) {
return $this->respondNoContent();
Expand Down

0 comments on commit 07e8b85

Please sign in to comment.