PHPackages                             vkabachenko/phpuser - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. vkabachenko/phpuser

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

vkabachenko/phpuser
===================

Simple non-database user class for yii2 projects

052PHP

Since Apr 15Pushed 10y ago1 watchersCompare

[ Source](https://github.com/vkabachenko/phpuser)[ Packagist](https://packagist.org/packages/vkabachenko/phpuser)[ RSS](/packages/vkabachenko-phpuser/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

OVERVIEW
========

[](#overview)

This extension provides user model based on user information gathered in configuration file instead of traditional database table. It may be useful in the case of one or few users in web application.

INSTALLATION
============

[](#installation)

Either run

```
php composer.phar require vkabachenko/phpuser "dev-master"

```

or add

```
"vkabachenko/phpuser": "dev-master"

```

to the require section of your `composer.json`

SETUP
=====

[](#setup)

**Prepare your console controller, say `UserController` as follows:**

```
class UserController extends \yii\console\Controller
{

    public function actions()
    {
        return [
            'add' => [
                'class' => 'vkabachenko\phpuser\AddUserAction',
                'pathAlias' => '@common'
            ],
        ];
    }
}

```

Property `pathAlias` depends on where user configuration file would be. In that case in `@common/config/users.php`.

**Run the controller's action in console**

Run

```
php yii user/add

```

and enter username and password for the user. Appropriate data would be stored in configuration file `users.php`.

**Merge user's data as application parameter**

Merge `users.php` file with other parameters files. For example in `@common/config/main.php`

```
$params = array_merge(
    require(__DIR__ . '/params.php'),
    require(__DIR__ . '/params-local.php'),
...........................................,
    require(__DIR__ . '/users.php')
);

```

**Use class `vkabachenko\phpuser\User.php` in application**

Now you can use model `vkabachenko\phpuser\User.php` for identifying user throughout the application: in `identityClass` at the `components/user` config section, in `login` action and so on.

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9642019?v=4)[Viktor Kabachenko](/maintainers/vkabachenko)[@vkabachenko](https://github.com/vkabachenko)

---

Top Contributors

[![vkabachenko](https://avatars.githubusercontent.com/u/9642019?v=4)](https://github.com/vkabachenko "vkabachenko (4 commits)")

### Embed Badge

![Health badge](/badges/vkabachenko-phpuser/health.svg)

```
[![Health](https://phpackages.com/badges/vkabachenko-phpuser/health.svg)](https://phpackages.com/packages/vkabachenko-phpuser)
```

###  Alternatives

[nelexa/google-play-scraper

Scrapes app data from Google Play store.

89505.3k](/packages/nelexa-google-play-scraper)

PHPackages © 2026

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