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

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

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.

0.1.19(8y ago)409.1k↓50%39[7 issues](https://github.com/krivochenko/yii2-users/issues)[1 PRs](https://github.com/krivochenko/yii2-users/pulls)BSD-3-ClausePHP

Since Jun 7Pushed 7y ago8 watchersCompare

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

READMEChangelog (10)Dependencies (3)Versions (21)Used By (0)

Yii2-users
==========

[](#yii2-users)

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

Abilities
---------

[](#abilities)

#### User registration and authorization by e-mail and via social networks with the ability to bind several different social networking accounts to a one account on the your site

[](#user-registration-and-authorization-by-e-mail-and-via-social-networks-with-the-ability-to-bind-several-different-social-networking-accounts-to-a-one-account-on-the-your-site)

[![Authorization widget](https://cloud.githubusercontent.com/assets/7313306/8025081/22fe3ae0-0d52-11e5-8c38-583ddd985ecf.png)](https://cloud.githubusercontent.com/assets/7313306/8025081/22fe3ae0-0d52-11e5-8c38-583ddd985ecf.png)[![OAuth keys manage widget](https://cloud.githubusercontent.com/assets/7313306/8025094/a61f284e-0d52-11e5-8efc-2125d9327aad.png)](https://cloud.githubusercontent.com/assets/7313306/8025094/a61f284e-0d52-11e5-8efc-2125d9327aad.png)

#### Changing password

[](#changing-password)

[![Changing password](https://cloud.githubusercontent.com/assets/7313306/8025109/e242004e-0d52-11e5-9a09-9f2636414afb.png)](https://cloud.githubusercontent.com/assets/7313306/8025109/e242004e-0d52-11e5-9a09-9f2636414afb.png)

#### Recovering password

[](#recovering-password)

[![Recovering password](https://cloud.githubusercontent.com/assets/7313306/8025124/59b3eebc-0d53-11e5-8c86-83539689d2ad.png)](https://cloud.githubusercontent.com/assets/7313306/8025124/59b3eebc-0d53-11e5-8c86-83539689d2ad.png)

#### Changing e-mail. Confirmation will be sent to the old and new address

[](#changing-e-mail-confirmation-will-be-sent-to-the-old-and-new-address)

[![Changing e-mai](https://cloud.githubusercontent.com/assets/7313306/8025142/a6b96a3e-0d53-11e5-8960-756a8e6bea59.png)](https://cloud.githubusercontent.com/assets/7313306/8025142/a6b96a3e-0d53-11e5-8960-756a8e6bea59.png)

#### Editinig profile

[](#editinig-profile)

[![Editinig profile](https://cloud.githubusercontent.com/assets/7313306/8025147/ce65cef6-0d53-11e5-87d3-e1c8d6b951a9.png)](https://cloud.githubusercontent.com/assets/7313306/8025147/ce65cef6-0d53-11e5-87d3-e1c8d6b951a9.png)

#### Administation module for manage users

[](#administation-module-for-manage-users)

[![Admin module](https://cloud.githubusercontent.com/assets/7313306/8025155/31222efe-0d54-11e5-918a-e8a7a3b1a95d.png)](https://cloud.githubusercontent.com/assets/7313306/8025155/31222efe-0d54-11e5-918a-e8a7a3b1a95d.png)

#### Editing RBAC structure and user rights via the GUI

[](#editing-rbac-structure-and-user-rights-via-the-gui)

[![Editing RBAC structure](https://cloud.githubusercontent.com/assets/7313306/8025181/dc581a9a-0d54-11e5-93d1-d720883f8a72.png)](https://cloud.githubusercontent.com/assets/7313306/8025181/dc581a9a-0d54-11e5-93d1-d720883f8a72.png)

[![Editiong user permissions](https://cloud.githubusercontent.com/assets/7313306/8025425/45d77c04-0d5f-11e5-9540-ba4613df53f2.png)](https://cloud.githubusercontent.com/assets/7313306/8025425/45d77c04-0d5f-11e5-9540-ba4613df53f2.png)

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist budyaga/yii2-users "*"

```

or add

```
"budyaga/yii2-users": "*"

```

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

Config
------

[](#config)

```
'user' => [
    'identityClass' => 'budyaga\users\models\User',
    'enableAutoLogin' => true,
    'loginUrl' => ['/login'],
],
'authClientCollection' => [
    'class' => 'yii\authclient\Collection',
    'clients' => [
        'vkontakte' => [
            'class' => 'budyaga\users\components\oauth\VKontakte',
            'clientId' => 'XXX',
            'clientSecret' => 'XXX',
            'scope' => 'email'
        ],
        'google' => [
            'class' => 'budyaga\users\components\oauth\Google',
            'clientId' => 'XXX',
            'clientSecret' => 'XXX',
        ],
        'facebook' => [
            'class' => 'budyaga\users\components\oauth\Facebook',
            'clientId' => 'XXX',
            'clientSecret' => 'XXX',
        ],
        'github' => [
            'class' => 'budyaga\users\components\oauth\GitHub',
            'clientId' => 'XXX',
            'clientSecret' => 'XXX',
            'scope' => 'user:email, user'
        ],
        'linkedin' => [
            'class' => 'budyaga\users\components\oauth\LinkedIn',
            'clientId' => 'XXX',
            'clientSecret' => 'XXX',
        ],
        'live' => [
            'class' => 'budyaga\users\components\oauth\Live',
            'clientId' => 'XXX',
            'clientSecret' => 'XXX',
        ],
        'yandex' => [
            'class' => 'budyaga\users\components\oauth\Yandex',
            'clientId' => 'XXX',
            'clientSecret' => 'XXX',
        ],
        'twitter' => [
            'class' => 'budyaga\users\components\oauth\Twitter',
            'consumerKey' => 'XXX',
            'consumerSecret' => 'XXX',
        ],
    ],
],
'urlManager' => [
    'enablePrettyUrl' => true,
    'showScriptName' => false,
    'rules' => [
        '/signup' => '/user/user/signup',
        '/login' => '/user/user/login',
        '/logout' => '/user/user/logout',
        '/requestPasswordReset' => '/user/user/request-password-reset',
        '/resetPassword' => '/user/user/reset-password',
        '/profile' => '/user/user/profile',
        '/retryConfirmEmail' => '/user/user/retry-confirm-email',
        '/confirmEmail' => '/user/user/confirm-email',
        '/unbind/' => '/user/auth/unbind',
        '/oauth/' => '/user/auth/index'
    ],
],
'authManager' => [
    'class' => 'yii\rbac\DbManager',
],

'modules' => [
    'user' => [
        'class' => 'budyaga\users\Module',
        'userPhotoUrl' => 'http://example.com/uploads/user/photo',
        'userPhotoPath' => '@frontend/web/uploads/user/photo'
    ],
],

```

Instead of XXX, you have to use yours values. To receive them, you must create applications on the social networks.

ClientRegistration addressvkontaktegooglefacebookgithublinkedinliveyandextwitterIf you are using advanced template and Yandex client, then you have to add authClientCollection in configurations for frontend and backend applications. However Yandex client should be added to only one of the applications. The reason for this is that Yandex one application can work with only one domain, you can not add two different Callback URL on different domains.

Not all services returns all user data. Some of the data get the default settings, if the service does not return them.

Database migrations
-------------------

[](#database-migrations)

*yii migrate/up --migrationPath=@vendor/budyaga/yii2-users/migrations*

This migration create all necessary for the operation of the module tables and two users:

E-mailPasswordUsage
-----

[](#usage)

in main layout:

```
use budyaga\users\components\AuthorizationWidget;

```

```

```

**Signup**:

**Profile**:

**Restore password**:

**Manage users**:

**Manage RBAC**:

Custom views and email templates
--------------------------------

[](#custom-views-and-email-templates)

If you want use custom views and email templates you can override their in config. For example:

```
'modules' => [
    'user' => [
        'class' => 'budyaga\users\Module',
        'customViews' => [
            'login' => '@app/views/site/login'
        ],
        'customMailViews' => [
            'confirmChangeEmail' => '@app/mail/confirmChangeEmail' //in this case you have to create files confirmChangeEmail-html.php and confirmChangeEmail-text.php in mail folder
        ]
    ],
],

```

You can override all views from *vendor\\budyaga\\yii2-users\\views\\user* and *vendor\\budyaga\\yii2-users\\mail* folders.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity37

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 73.3% 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 ~46 days

Recently: every ~53 days

Total

20

Last Release

3106d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/60b60cc1f11466d89a8893ebcdf57ae88bde79154e47d3d583a9c1e7a1b4a81b?d=identicon)[budyaga](/maintainers/budyaga)

---

Top Contributors

[![krivochenko](https://avatars.githubusercontent.com/u/7313306?v=4)](https://github.com/krivochenko "krivochenko (33 commits)")[![besnovatyj](https://avatars.githubusercontent.com/u/1440158?v=4)](https://github.com/besnovatyj "besnovatyj (8 commits)")[![idealist35](https://avatars.githubusercontent.com/u/121423686?v=4)](https://github.com/idealist35 "idealist35 (2 commits)")[![BaBL86](https://avatars.githubusercontent.com/u/483972?v=4)](https://github.com/BaBL86 "BaBL86 (1 commits)")[![bodilych](https://avatars.githubusercontent.com/u/17160653?v=4)](https://github.com/bodilych "bodilych (1 commits)")

---

Tags

oauthrbacyii2extensionmoduleUsers

### Embed Badge

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

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

###  Alternatives

[lowbase/yii2-user

Yii2 user module

131.5k2](/packages/lowbase-yii2-user)

PHPackages © 2026

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