User module
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist yii2mod/yii2-user "*"
or add
"yii2mod/yii2-user": "*"
to the require section of your composer.json
file.
If you use this extension separate from the base template, then you need execute cms init migration by the following command:
php yii migrate/up --migrationPath=@vendor/yii2mod/yii2-user/migrations
Add to SiteController (or configure via $route
param in urlManager):
/**
* @return array
*/
public function actions()
{
return [
'login' => [
'class' => 'yii2mod\user\actions\LoginAction'
],
'logout' => [
'class' => 'yii2mod\user\actions\LogoutAction'
],
'signup' => [
'class' => 'yii2mod\user\actions\SignupAction'
],
'request-password-reset' => [
'class' => 'yii2mod\user\actions\RequestPasswordResetAction'
],
'password-reset' => [
'class' => 'yii2mod\user\actions\PasswordResetAction'
],
];
}
You can then access to this actions through the following URL: