maddoger/yii2-cms-user

There is no license information available for the latest version (v1.0.8) of this package.

User module for Yii2 CMS.

Installs: 25

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:yii2-extension

v1.0.8 2015-11-05 08:37 UTC

This package is not auto-updated.

Last update: 2024-10-26 18:38:38 UTC


README

Yii2 User module

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist maddoger/yii2-user "*"

or add

"maddoger/yii2-user": "*"

to the require section of your composer.json file.

##Migration

./yii migrate --migrationPath="@maddoger/user/common/migrations"

##Configuration

...
'modules' => [
    ...
    'user' => [
        'class' => 'maddoger\user\backend\Module',
        'guestLayout' => '@maddoger/admin/views/layouts/minimal.php',
        //'sortNumber' => 11
    ],
    ...
],
...

##Components

'components' => [
    'urlManager' => [
        'rules' => [
            //User
            '<action:(login|logout|request-password-reset|reset-password)>' => 'user/auth/<action>',
            'profile' => 'user/user/profile',
        ]
    ],
    'user' => [
        'identityClass' => 'maddoger\user\common\models\User',
        'loginUrl' => ['user/auth/login'],
        'enableAutoLogin' => true,
        //'on afterLogin'   => ['maddoger\user\common\models\User', 'updateLastVisit'],
        //'on afterLogout'   => ['maddoger\user\common\models\User', 'updateLastVisit'],
    ],
    'session' => [
        'class' => 'yii\web\DbSession',
        'sessionTable' => '{{%user_session}}',
    ],
...
]