Users
Users Functionality, (*1)
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require --prefer-dist jakharbek/yii2-users "*"
or add, (*4)
"jakharbek/yii2-users": "*"
to the require section of your composer.json
file., (*5)
Connect the module to the public (frontend) part:, (*6)
module path, (*7)
jakharbek\users\modules\user\Module
and specify the path to the token confirmation controller, (*8)
'confirmLink', 'unConfirmLink'
example, (*9)
'modules' => [ ... 'users' => [ 'class' => 'jakharbek\users\modules\user\Module', 'confirmLink' => 'http://sitename.loc/users/token/confirm?token=', 'unConfirmLink' => 'http://sitename.loc/users/token/unconfirm?token=', ], ],
Connect the module to the admin (backend) part:, (*10)
module path, (*11)
jakharbek\users\modules\admin\Module
and specify the path to the token confirmation controller from frontend public part, (*12)
'confirmLink', 'unConfirmLink'
example, (*13)
'modules' => [ ... 'users' => [ 'class' => 'jakharbek\users\modules\admin\Module', 'confirmLink' => 'http://sitename.loc/users/token/confirm?token=', 'unConfirmLink' => 'http://sitename.loc/users/token/unconfirm?token=', ], ],
After you have to connect the controllers, (*14)
'controllerMap' => [ 'login' => 'jakharbek\users\modules\admin\controllers\LoginController', 'logout' => 'jakharbek\users\modules\admin\controllers\LogoutController', ],
and you also need to configure the mail component and should be under the mailer ID, (*15)
and add in main params your email, (*16)
[ 'email_from' => 'your@mail', ]
and you must make migration. you can find migrations from folder migrations in extension's folder, (*17)