Yii2-user is designed to work out of the box. It means that installation requires minimal steps. Only one configuration step should be taken and you are ready to have user management on your Yii2 website.
If you're using Yii2 advanced template, you should read this article firstly.
Yii2-user can be installed using composer. Run following command to download and install Yii2-user:
composer require "dektrium/yii2-user:0.9.*@dev"NOTE: Make sure that you don't have
usercomponent configuration in your config files.
Add following lines to your main configuration file:
'modules' => [
'user' => [
'class' => 'dektrium\user\Module',
],
],The last thing you need to do is updating your database schema by applying the
migrations. Make sure that you have properly configured db application component
and run the following command:
$ php yii migrate/up --migrationPath=@vendor/dektrium/yii2-user/migrationsYou have Yii2-user installed. Now you can check out the list of articles for more information.
If you're having troubles with Yii2-user, make sure to check out the troubleshooting guide.