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

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

yii2-extensions/user
====================

Flexible user registration and authentication module for Yii 2.0

193[1 issues](https://github.com/yii2-extensions/user/issues)[1 PRs](https://github.com/yii2-extensions/user/pulls)PHP

Since Jan 2Pushed 2y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (2)Used By (0)

 [ ![](https://camo.githubusercontent.com/cc75562bca6e54e98046e4fb187ef8d96c997a8f31c6f4d2f6ed0c816413b47a/68747470733a2f2f7777772e7969696672616d65776f726b2e636f6d2f696d6167652f7969695f6c6f676f5f6c696768742e737667) ](https://github.com/yii2-extensions/user)

User extension for Yii2.
========================

[](#user-extension-for-yii2)

 [ ![php-version](https://camo.githubusercontent.com/cfe9179013aaeb962182231f5cc56946d96d3c7356e64008b58bad1025cfb1e9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253345253344382e312d373837434235) ](https://www.php.net/releases/8.1/en.php) [ ![yii2-version](https://camo.githubusercontent.com/f946cb5d9010fb3cc3f9d9530b51fee224bdbabe1345dd3f090dfbca82446217/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5969693225323076657273696f6e2d322e322d626c7565) ](https://github.com/yiisoft/yii2/tree/2.2) [ ![PHPUnit](https://github.com/yii2-extensions/user/actions/workflows/build.yml/badge.svg) ](https://github.com/yii2-extensions/user/actions/workflows/build.yml) [ ![Codecov](https://camo.githubusercontent.com/5988368628b745381d9d89b3b793c1e3acce1dc5502c3db9572fb590a3b03f92/68747470733a2f2f636f6465636f762e696f2f67682f796969322d657874656e73696f6e732f757365722f6272616e63682f6d61696e2f67726170682f62616467652e7376673f746f6b656e3d4d4630585547564c5943) ](https://codecov.io/gh/yii2-extensions/user) [ ![PHPStan](https://github.com/yii2-extensions/gii/actions/workflows/static.yml/badge.svg) ](https://github.com/yii2-extensions/user/actions/workflows/static.yml) [ ![PHPStan level](https://camo.githubusercontent.com/17a9258ed6588a68408bb21370872041ef994ea597548332232523398ab33dc6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2532306c6576656c2d352d626c7565) ](https://github.com/yii2-extensions/user/actions/workflows/static.yml) [ ![Code style](https://camo.githubusercontent.com/9b54cfb2cf7ea6c82fc2d9c2b4daa3748ef53afdb76669e77b6fba5b916d8baf/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3730343434353230342f736869656c643f6272616e63683d6d61696e) ](https://github.styleci.io/repos/704445204?branch=main)

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

[](#installation)

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

Either run

```
php composer.phar require --dev --prefer-dist yii2-extensions/user

```

or add

```
"yii2-extensions/user": "dev-main"

```

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

Configuration
-------------

[](#configuration)

User extension requires a database connection. You should configure it in your application configuration like the following:

`config/components.php`

```
