maddoger / yii2-cms-user
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
Requires
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}}',
],
...
]