Skip to content

Commit

Permalink
Fixed #15168
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Jun 8, 2024
1 parent b11af82 commit 63dbde4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG-WIP.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,4 @@
- The search keyword index is now updated for owner elements, when a nested element is saved directly which belongs to a searchable custom field.
- Updated Yii to 2.0.50. ([#15124](https://github.com/craftcms/cms/issues/15124))
- Updated inputmask to 5.0.9.
- Fixed a bug where the `users/login` action wasn’t checking if someone was already logged in. ([#15168](https://github.com/craftcms/cms/issues/15168))
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Unreleased

- Fixed an error that occurred when using a multi-environment config. ([#15154](https://github.com/craftcms/cms/issues/15154))
- Fixed a bug where the `users/login` action wasn’t checking if someone was already logged in. ([#15168](https://github.com/craftcms/cms/issues/15168))

## 5.2.0-beta.4 - 2024-06-07

Expand Down
8 changes: 7 additions & 1 deletion src/controllers/UsersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,13 @@ public function beforeAction($action): bool
*/
public function actionLogin(): ?Response
{
if (!$this->request->getIsPost()) {
if ($this->request->getIsGet()) {
// see if they're already logged in
$user = static::currentUser();
if ($user) {
return $this->_handleSuccessfulLogin($user);
}

return null;
}

Expand Down

0 comments on commit 63dbde4

Please sign in to comment.