PHPackages                             skylineos/yii.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. skylineos/yii.user

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

skylineos/yii.user
==================

Standalone user module with login, reset, mgmt, etc

1.0.1(3y ago)019Apache-2.0PHPPHP &gt;=7.4

Since Oct 7Pushed 3y ago4 watchersCompare

[ Source](https://github.com/skylineos/yii2-user)[ Packagist](https://packagist.org/packages/skylineos/yii.user)[ RSS](/packages/skylineos-yiiuser/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (2)Dependencies (13)Versions (4)Used By (0)

Skyilne Yii User Extension
==========================

[](#skyilne-yii-user-extension)

An extension for the Yii framework to boilerplate the creation, update, viewing, and removal of authentication users.

- [Skyilne Yii User Extension](#skyilne-yii-user-extension)
    - [Installation](#installation)
    - [Yii compatibility](#yii-compatibility)
    - [Configure](#configure)
        - [Params](#params)
    - [Migrations](#migrations)
    - [Dependencies](#dependencies)
    - [Testing (Unit and Functional)](#testing-unit-and-functional)
        - [Running Tests](#running-tests)
        - [Testing Branches](#testing-branches)
        - [Testing Hints and Tips](#testing-hints-and-tips)

---

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

[](#installation)

Add a repository entry to the `compose.json` file:

```
{
    "type": "vcs",
    "url": "git@gitlab.skyts.io:csg/yii/yii2-user.git"
}

```

Add an entry into the `required` property of the `compose.json` file:

```
    "skyline/yii.user": "[version]"

```

Where \[version\] is the version of this extension.

Yii compatibility
-----------------

[](#yii-compatibility)

Extension VersionYii Version1.0.0yii2 &gt;= 2.0.41Configure
---------

[](#configure)

In your configuration file (normally `config/web.php`) add the following entries:

```
    components' => [
        // ... other components ...
        'user' => [
            'identityClass' => 'skyline\yii\user\models\User',
            'enableAutoLogin' => true,
        ],
    ],
    'modules' => [
        // ... other modules ...
        'user' => [
            // Required Parameters
            'class' => 'skyline\yii\user\Module',
            'defaultRoute' => 'UserController',

            /**
             * Optional settings
             */

            // Where to redirect after logging in/handling auth sessions
            'homeRedirect' => '/cms',

            // How long the password reset token should last (eg. today + x time)
            // @see https://www.php.net/strtotime
            'passwordResetTokenExp' => '+5 days',

            // How long the remember me should function
            'rememberMeExpiration' => 3600 * 24 * 30,

            // If you want to override the default layout
            // If you want to use the default layout within the module, set this
            // to '@vendor/skylineos/yii.user/views/layouts/login'
            'layout' => '@app/.../views/layouts/'

            /**
             * If you want to override the views folder. It will look for a folder 'users' in whatever you specify,
             * so, don't add 'user' to your path. Once you've run the migration, you can use gii/crud to generate the
             * views for you in your specified namespace (super helpful if you have a template registered with gii)
             */
            'viewPath' => '@app/.../views/'
        ],
    ]

```

Also add a `route` rule to point to the User views / controllers:

```
    "components" => [...],
    "modules" => [
        // ... other modules ...
        'urlManager' => [
            'enablePrettyUrl' => true,
            'showScriptName' => false,
            'rules' => [
                '/cms/login' => '/user/user/login',
                '/cms/' => '/cms/index',
                '/cms/users/' => '/user/user/',
                '/cms/users/' => '/user/user',
                '/' => '/',
                '' => '/site/render'
            ],
        ],
        // ... other modules ...
    ]

```

In your `config/console.php` add the routes for this module's commands (if you would like to use them)

```
    'bootstrap' => [
        // ... other bootstrap components ...
        'user'
    ],
    'modules' => [
        // ... other modules ...
        'user' => [
            'class' => 'skyline\yii\user\Module',
        ],
    ],

```

### Params

[](#params)

Add the following parameters to the `params` key of your configuration file:

```
'supportEmail' => '',
'supportEmailDisplayName' => 'Skyline Dude',
'passwordRecoverySubject' => 'Forgot your password?',
'newUserEmailSubject' => 'Please finish setting up your account',

```

KeyTypeDescriptionRequiredsupportEmailstring'from' Email addressYessupportEmailDisplayNamestring'from' Display nameYespasswordRecoverySubjectstringEmail subject for password recovery emailNonewUserEmailSubjectstringEmail subject for new user emailNoMigrations
----------

[](#migrations)

In order to ensure that your database is setup properly, you will need to run the migrations located in the extension.

`php yii migrate/up --migrationPath=@vendor/skylineos/yii.user/migrations`

If something goes wrong with the migration, remove any lingering changes with this command:

`php yii migrate/down --migrationPath=@vendor/skylineos/yii.user/migrations`

Dependencies
------------

[](#dependencies)

- `skyline\yii\metronic: >=1.0.0` (accessed with the `git@gitlab.skyts.io:csg/yii/yii2.module.metronic.git` repository entry)
- `aws/aws-sdk-php: *`, for mail (deprecated for posix)

Testing (Unit and Functional)
-----------------------------

[](#testing-unit-and-functional)

This package ships with configuration and docker-compose for easy testing. Docker-compose will give you access to php extensions, xdebug (for code coverage), composer (will install your dependencies), and a database for functional testing.

1. `docker-compose build` *only necessary if this is your first run or if you've modified the Dockerfile*
2. `docker-compose up -d`
3. `docker-compose exec php bash`

### Running Tests

[](#running-tests)

Assuming you're bashed into the php container and in /app

1. `./vendor/bin/codecept run`
2. `./vendor/bin/codecept --help`

### Testing Branches

[](#testing-branches)

If you feel the need or think it's generally a good idea (it is), feel free to branch from `develop`. Otherwise, for smaller updates, be sure to do all of your work on the `develop` branch. You are expected to submit a merge request.

### Testing Hints and Tips

[](#testing-hints-and-tips)

The team largely uses VSCode, it is *recommended* that you do as well. If you find extensions or workflows that are mighty helpful, please feel free to add them here.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.7% 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 ~31 days

Total

2

Last Release

1278d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bbb67a162221673b3475f9d541b7f05524efea155d676207696e71cc0e42f5d2?d=identicon)[dkemens](/maintainers/dkemens)

---

Top Contributors

[![skylinebweithers](https://avatars.githubusercontent.com/u/260750835?v=4)](https://github.com/skylinebweithers "skylinebweithers (47 commits)")[![lwelchSkyline](https://avatars.githubusercontent.com/u/57543197?v=4)](https://github.com/lwelchSkyline "lwelchSkyline (6 commits)")

###  Code Quality

TestsCodeception

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/skylineos-yiiuser/health.svg)

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

###  Alternatives

[rmrevin/yii2-ulogin

Extension for yii2 ulogin integration

1811.9k](/packages/rmrevin-yii2-ulogin)[kakadu-dev/yii2-jwt-auth

Extension provide JWT auth for Yii2

105.8k](/packages/kakadu-dev-yii2-jwt-auth)

PHPackages © 2026

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