PHPackages                             yii1tech/web-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. yii1tech/web-user

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

yii1tech/web-user
=================

Provides advanced web user component for Yii1

1.0.0(2y ago)24.9k↓33.3%BSD-3-ClausePHPPHP &gt;=7.1

Since Jun 16Pushed 2y ago1 watchersCompare

[ Source](https://github.com/yii1tech/web-user)[ Packagist](https://packagist.org/packages/yii1tech/web-user)[ GitHub Sponsors](https://github.com/klimov-paul)[ Patreon](https://www.patreon.com/klimov_paul)[ RSS](/packages/yii1tech-web-user/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

 [ ![](https://avatars.githubusercontent.com/u/134691944) ](https://github.com/yii1tech)

Advanced web user component for Yii 1
=====================================

[](#advanced-web-user-component-for-yii-1)

This extension provides advanced web user component for Yii 1.

For license information check the [LICENSE](LICENSE.md)-file.

[![Latest Stable Version](https://camo.githubusercontent.com/0ede594f07d698a3648b6711517cd8d4e99b140104eb6867b64a53a5a87cfe24/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f79696931746563682f7765622d757365722e737667)](https://packagist.org/packages/yii1tech/web-user)[![Total Downloads](https://camo.githubusercontent.com/736dcc1137b8e342028e17ed69d233c5c5519c240ccf4f79088b8e827b552645/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f79696931746563682f7765622d757365722e737667)](https://packagist.org/packages/yii1tech/web-user)[![Build Status](https://github.com/yii1tech/web-user/workflows/build/badge.svg)](https://github.com/yii1tech/web-user/actions)

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist yii1tech/web-user

```

or add

```
"yii1tech/web-user": "*"
```

to the "require" section of your composer.json.

Usage
-----

[](#usage)

This extension provides advanced version of the standard `CWebUser` component for Yii 1. Class `yii1tech\web\user\WebUser` adds ability for setup external handlers for the authentication flow events. Following events are available:

- 'onAfterRestore' - raises after user data restoration from session, cookie and so on.
- 'onBeforeLogin' - raises before user logs in.
- 'onAfterLogin' - raises after user successfully logged in.
- 'onBeforeLogout' - raises before user logs out.
- 'onAfterLogout' - raises after user successfully logged out.

Application configuration example:

```
