PHPackages                             giannisdag/yii2-check-login-attempts - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. giannisdag/yii2-check-login-attempts

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

giannisdag/yii2-check-login-attempts
====================================

Disable login after multiple failures.

v1.1.2(8y ago)2254.2k↓32.9%2PHP

Since Dec 22Pushed 7y ago1 watchersCompare

[ Source](https://github.com/giannisdag/yii2-check-login-attempts)[ Packagist](https://packagist.org/packages/giannisdag/yii2-check-login-attempts)[ RSS](/packages/giannisdag-yii2-check-login-attempts/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (6)Used By (0)

yii2-check-login-attempts
=========================

[](#yii2-check-login-attempts)

this is a checker for login attempts

based on

Installation
------------

[](#installation)

The preferred way to install this extension is through composer. Either run

composer require giannisdag/yii2-check-login-attempts

or add

"giannisdag/yii2-check-login-attempts": "\*"

to the require section of your composer.json file.

Usage
-----

[](#usage)

Run the following migration

```
php yii migrate --migrationPath="@vendor/giannisdag/yii2-check-login-attempts/src/migrations"  --interactive=0
```

Add the behavior to your login model

```
    public function behaviors()
    {
        $behaviors = parent::behaviors();

        $behaviors[] = [
             'class' => '\giannisdag\yii2CheckLoginAttempts\behaviors\LoginAttemptBehavior',

            // Amount of attempts in the given time period
            'attempts' => 3,

            // the duration, in seconds, for a regular failure to be stored for
            // resets on new failure
            'duration' => 300,

            // the duration, in seconds, to disable login after exceeding `attemps`
            'disableDuration' => 900,

            // the attribute used as the key in the database
            // and add errors to
            'usernameAttribute' => 'username',

            // the attribute to check for errors
            'passwordAttribute' => 'password',

            // the validation message to return to `usernameAttribute`
            'message' => Yii::t('app', 'Login disabled'),
        ];

        return $behaviors;
    }
```

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity38

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~5 days

Total

4

Last Release

3053d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2151129?v=4)[giannisdag](/maintainers/giannisdag)[@giannisdag](https://github.com/giannisdag)

---

Top Contributors

[![giannisdag](https://avatars.githubusercontent.com/u/2151129?v=4)](https://github.com/giannisdag "giannisdag (14 commits)")

---

Tags

yii2Behavior

### Embed Badge

![Health badge](/badges/giannisdag-yii2-check-login-attempts/health.svg)

```
[![Health](https://phpackages.com/badges/giannisdag-yii2-check-login-attempts/health.svg)](https://phpackages.com/packages/giannisdag-yii2-check-login-attempts)
```

###  Alternatives

[yii2mod/yii2-rbac

RBAC management module for Yii2

150351.4k7](/packages/yii2mod-yii2-rbac)[ethercreative/yii2-login-attempts-behavior

Disable login after multiple failures.

104.6k](/packages/ethercreative-yii2-login-attempts-behavior)[rmrevin/yii2-ulogin

Extension for yii2 ulogin integration

1811.9k](/packages/rmrevin-yii2-ulogin)[kakadu-dev/yii2-jwt-auth

Extension provide JWT auth for Yii2

105.8k](/packages/kakadu-dev-yii2-jwt-auth)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
