02/01
2016
dev-master
9999999-devyii2 user management
MIT
The Requires
by shreenu
yii2 user management
Yii2 User Management, (*1)
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
composer require shreenu/yii2-usermanagement
or add, (*4)
"shreenu/yii2-usermanagement": "*"
to the require section of your composer.json
file., (*5)
and run, (*6)
composer update
change your configuration file., (*7)
'components' => [ 'user'=> [ 'identityClass' => \shreenu\usermanagement\models\User::className(), 'enableAutoLogin' => true, ], ]
'modules'=> [ 'usermanagement'=>[ 'class' => \shreenu\usermanagement\usermanagementModule::className(), ], ],
Change your menu code, (*8)
Yii::$app->user->isGuest ? ['label' => 'Login', 'url' => ['/usermanagement/user/login']] : [ 'label' => 'Logout (' . Yii::$app->user->identity->username . ')', 'url' => ['/usermanagement/user/logout'], 'linkOptions' => ['data-method' => 'post'] ],
yii2 user management
MIT