Skip to content

Base user extension. Provides login / logout / reset password / registration and profile.

License

Notifications You must be signed in to change notification settings

laoheimao/yii2-user

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

User module

User module

  • Scrutinizer Code Quality
  • Build Status

Installation

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.

Usage

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:

  1. http://localhost/site/login
  2. http://localhost/site/request-password-reset
  3. http://localhost/site/signup
  4. http://localhost/site/logout

About

Base user extension. Provides login / logout / reset password / registration and profile.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%