PHPackages                             nkostadinov/yii2-user - 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. nkostadinov/yii2-user

ActiveYii2-extension[Authentication &amp; Authorization](/categories/authentication)

nkostadinov/yii2-user
=====================

User management functionalities.

0.12-beta(7y ago)106104Apache-2.0PHP

Since Mar 16Pushed 6y ago6 watchersCompare

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

READMEChangelogDependencies (5)Versions (7)Used By (0)

Yii2 User module [![Build Status](https://camo.githubusercontent.com/e6f9e1dbc7bca2bd8eb320f54fbe361aab38df96016ff8b947e8f0304adbac6d/68747470733a2f2f7472617669732d63692e6f72672f6e6b6f73746164696e6f762f796969322d757365722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/nkostadinov/yii2-user)
===============================================================================================================================================================================================================================================================================================================

[](#yii2-user-module-)

Just another user module management functionalities.

- Optional self registration via front end
- Lost password retrieval(optional)
- User administration interface
- Flexible access control
- Console commnads(TODO)
- Advanced user (optional)

Installation
============

[](#installation)

1. Download Yii2-user using composer

---

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist nkostadinov/yii2-user "*"

```

or add

```
"nkostadinov/yii2-user": "*"

```

to the require section of your `composer.json` file.

2. Configure your application

---

Add following lines to your main configuration file:

```
'components' => [
    'user' => [
        'class' => 'nkostadinov\user\components\User',
    ],
],
```

```
'modules' => [
    'user' => [
        'class' => 'nkostadinov\user\Module',
    ],
],
```

Step 3: Update database schema
------------------------------

[](#step-3-update-database-schema)

> **NOTE:** Make sure that you have properly configured **db** application component.

After you downloaded and configured Yii2-user, the last thing you need to do is updating your database schema by applying the migrations:

```
$ php yii migrate/up --migrationPath=@vendor/nkostadinov/yii2-user/migrations
```

How to run tests
================

[](#how-to-run-tests)

Install codeception globally:

```
$ composer global require "codeception/codeception=*" "codeception/specify=*" "codeception/verify=*"
```

Install globally the composer's asset plugin:

```
$ composer global require "fxp/composer-asset-plugin:~1.1.0"
```

Go to nkostadinov/yii2-user directory and run:

```
$ composer update
```

Build the codeception actors:

```
$ codecept build
```

Create a new database called 'user\_test':

```
$ mysql -e 'create database user_test;'
```

Run the migrations:

```
$ php tests/_app/yii migrate --interactive=0
```

Advanced user
=============

[](#advanced-user)

The yii2-user extension has the following additional functionalities that can be added on demand:

- \[Password aging\] (docs/PASSWORD\_AGING.md)
- \[Password history policy\] (docs/PASSWORD\_HISTORY\_POLICY.md)
- \[Account locking policy\] (docs/ACCOUNT\_LOCKING\_POLICY.md)
- \[First login policy\] (docs/FIRST\_LOGIN\_POLICY.md)

Admin panel
===========

[](#admin-panel)

You can find the admin panel on /user/admin/index route. In order to set proper permissions, change the access rules of the controller via the `$adminRules` property of the User component. Defaults to:

```
[
    [
        'allow' => true,
        'roles' => ['@']
    ]
]

```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 60.9% 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 ~528 days

Total

3

Last Release

2659d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c315c9f4a7260ad3357e2b049a7574af2796be04a20bf0cfa4d733e164d1ed70?d=identicon)[phreakbg](/maintainers/phreakbg)

---

Top Contributors

[![nkostadinov](https://avatars.githubusercontent.com/u/1700251?v=4)](https://github.com/nkostadinov "nkostadinov (103 commits)")[![traykovn](https://avatars.githubusercontent.com/u/15726779?v=4)](https://github.com/traykovn "traykovn (65 commits)")[![AMilkov](https://avatars.githubusercontent.com/u/3135232?v=4)](https://github.com/AMilkov "AMilkov (1 commits)")

---

Tags

useryii2extension

### Embed Badge

![Health badge](/badges/nkostadinov-yii2-user/health.svg)

```
[![Health](https://phpackages.com/badges/nkostadinov-yii2-user/health.svg)](https://phpackages.com/packages/nkostadinov-yii2-user)
```

###  Alternatives

[2amigos/yii2-usuario

Highly customizable and extensible user management, authentication, and authorization Yii2 extension

298275.5k14](/packages/2amigos-yii2-usuario)[lowbase/yii2-user

Yii2 user module

131.5k2](/packages/lowbase-yii2-user)[budyaga/yii2-users

Module for manage users and their rights with the support of registration through social services and assigned to each user more than one social service.

409.1k](/packages/budyaga-yii2-users)

PHPackages © 2026

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