PHPackages                             wdmg/yii2-users - 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. wdmg/yii2-users

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

wdmg/yii2-users
===============

Users management module

1.2.7(2y ago)668033MITPHP

Since Jan 14Pushed 2y ago4 watchersCompare

[ Source](https://github.com/wdmg/yii2-users)[ Packagist](https://packagist.org/packages/wdmg/yii2-users)[ Docs](https://github.com/wdmg/yii2-users)[ RSS](/packages/wdmg-yii2-users/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (5)Dependencies (4)Versions (20)Used By (3)

[![Yii2](https://camo.githubusercontent.com/3f29058a9886ae3e9efc09df82d551051f8ea6c8da1176d9e8ca8a64be6f9b40/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f72657175697265642d596969325f76322e302e34302d626c75652e737667)](https://packagist.org/packages/yiisoft/yii2)[![Downloads](https://camo.githubusercontent.com/71281a45004d77e9c1fe0adbcf309016cc39e87a109cb8215639a494763a79d6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f77646d672f796969322d75736572732e737667)](https://packagist.org/packages/wdmg/yii2-users)[![Packagist Version](https://camo.githubusercontent.com/0753f516174d849ba9185d4074859e85fdd1cd0b719daeb68d012058d791a871/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f77646d672f796969322d75736572732e737667)](https://packagist.org/packages/wdmg/yii2-users)[![Progress](https://camo.githubusercontent.com/d2c102b075c16f8a841e697b04c43bc93c8d092c5795ad8b3090d7fa993c258a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f70726f67726573732d72656164795f746f5f7573652d677265656e2e737667)](https://camo.githubusercontent.com/d2c102b075c16f8a841e697b04c43bc93c8d092c5795ad8b3090d7fa993c258a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f70726f67726573732d72656164795f746f5f7573652d677265656e2e737667)[![GitHub license](https://camo.githubusercontent.com/9442e1c3aa749f42b1a492acb8253ceed0d2fb3e91c4a1e11ecac0ba0b825919/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f77646d672f796969322d75736572732e737667)](https://github.com/wdmg/yii2-users/blob/master/LICENSE)

[![Yii2 Users Module](./docs/images/yii2-users.png)](./docs/images/yii2-users.png)

Yii2 Users Module
=================

[](#yii2-users-module)

Users management module

This module is an integral part of the [Butterfly.СMS](https://butterflycms.com/) content management system, but can also be used as an standalone extension.

Copyrights (c) 2019-2023 [W.D.M.Group, Ukraine](https://wdmg.com.ua/)

Requirements
============

[](#requirements)

- PHP 5.6 or higher
- Yii2 v.2.0.40 and newest
- [Yii2 Base](https://github.com/wdmg/yii2-base) module (required)

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

[](#installation)

To install the module, run the following command in the console:

`$ composer require "wdmg/yii2-users"`

After configure db connection, run the following command in the console:

`$ php yii users/init`

And select the operation you want to perform:

1. Apply all module migrations
2. Revert all module migrations
3. Batch insert demo data\*

\* - The demo database contains 6 demo user`s with:

IDUsernamePasswordEmailStatus100adminadmin`active`101demodemo`inactive`102alicealice`inactive`103bobbob`inactive`104johndoejohndoe`inactive`105janedoejanedoe`inactive`Migrations
==========

[](#migrations)

In any case, you can execute the migration and create the initial data, run the following command in the console:

`$ php yii migrate --migrationPath=@vendor/wdmg/yii2-users/migrations`

Configure
=========

[](#configure)

To add a module to the project, add the following data in your configuration file:

```
'components' => [
    'user' => [
        'identityClass' => 'wdmg\users\models\Users',
    ],
    ...
],
'modules' => [
    'users' => [
        'class' => 'wdmg\users\Module',
        'routePrefix' => 'admin',
        'rememberDuration' => (3600 * 24 * 30),
        'signupConfirmation' => [
            'needConfirmation' => false,
            'checkTokenRoute' => 'site/signup-confirm',
            'supportEmail' => 'noreply@example.com',
            'emailViewPath' => [
                'html' => '@vendor/wdmg/yii2-users/mail/signupConfirmation-html',
                'text' => '@vendor/wdmg/yii2-users/mail/signupConfirmation-text',
            ],
        ],
        'passwordReset' => [
            'resetTokenExpire' => 3600,
            'checkTokenRoute' => 'site/reset-password',
            'supportEmail' => 'noreply@example.com',
            'emailViewPath' => [
                'html' => '@vendor/wdmg/yii2-users/mail/passwordReset-html',
                'text' => '@vendor/wdmg/yii2-users/mail/passwordReset-text',
            ],
        ],
        'multiSignIn' => true,
        'sessionTimeout' => 0, // where `0` is unlimited
    ],
    ...
],

```

Usage
=====

[](#usage)

See the [USECASES.md](https://github.com/wdmg/yii2-users/blob/master/USECASES.md) for more details.

Routing
=======

[](#routing)

Use the `Module::dashboardNavItems()` method of the module to generate a navigation items list for NavBar, like this:

```

```

Status and version \[ready to use\]
===================================

[](#status-and-version-ready-to-use)

- v.1.2.7 - Fixed identity, add user options
- v.1.2.6 - Fixed copyrights and getUserId()
- v.1.2.5 - Fixed: syntax error, unexpected '::' (T\_PAAMAYIM\_NEKUDOTAYIM)
- v.1.2.4 - Multiple Sign In`s and logoffs by session timeout

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity69

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 ~89 days

Recently: every ~227 days

Total

19

Last Release

1054d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9806ee0c149c1e5f7a634cbb9528b400d3bff22ce7d67bcbac89cb0b1a9147c2?d=identicon)[alex-wdmg](/maintainers/alex-wdmg)

---

Top Contributors

[![alex-wdmg](https://avatars.githubusercontent.com/u/1635637?v=4)](https://github.com/alex-wdmg "alex-wdmg (87 commits)")

---

Tags

users-managerwdmgyii2yii2-extensionyii2-usersyii2Userswdmgyii2-usersusers manager

### Embed Badge

![Health badge](/badges/wdmg-yii2-users/health.svg)

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

###  Alternatives

[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)
