Skip to content

Commit

Permalink
not admin lockout cleanup for api users (#748)
Browse files Browse the repository at this point in the history
* not admin lockout cleanup for api users

* changelog
  • Loading branch information
nadar authored Nov 30, 2023
1 parent 19cfd1f commit 2c2cfb9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/).
In order to read more about upgrading and BC breaks have a look at the [UPGRADE Document](UPGRADE.md).

## 5.0.1

+ [#748](https://github.com/luyadev/luya-module-admin/pull/748) Do not clean up user lockouts when the user is an API-based user. This will enhance the performance for API user requests.

## 5.0.0 (30. November 2023)

> **Check the [UPGRADE document](UPGRADE.md) to read more about breaking changes.**
Expand Down
5 changes: 2 additions & 3 deletions src/components/AdminUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,9 @@ public function onAfterLogin(UserEvent $event)
{
if (!$this->identity->is_api_user) {
Yii::$app->language = $this->getInterfaceLanguage();
// remove all lockout entrys for the given ip
UserLoginLockout::deleteAll(['ip' => Yii::$app->request->userIP]);
}

// remove all lockout entrys for the given ip
UserLoginLockout::deleteAll(['ip' => Yii::$app->request->userIP]);
}

/**
Expand Down

0 comments on commit 2c2cfb9

Please sign in to comment.