2017 © Pedro Peláez
 

library yii-user

Yii PHP Framework extension for registration and management users accounts.

image

mishamx/yii-user

Yii PHP Framework extension for registration and management users accounts.

  • Monday, April 24, 2017
  • by mishamx
  • Repository
  • 38 Watchers
  • 196 Stars
  • 186 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 170 Forks
  • 48 Open issues
  • 1 Versions
  • 2 % Grown

The README.md

Yii-User Installation

Download

Download or checkout (SVN/Git) from http://yii-user.2mx.org and unpack files in your protected/modules/user, (*1)

Git clone

clone git git@github.com:mishamx/yii-user.git

Configure

Change your config main:, (*2)

return array(
    #...
    // autoloading model and component classes
    'import'=>array(
        'application.models.*',
        'application.components.*',
        'application.modules.user.models.*',
        'application.modules.user.components.*',
    ),

    #...
    'modules'=>array(
        #...
        'user'=>array(
            # encrypting method (php hash function)
            'hash' => 'md5',

            # send activation email
            'sendActivationMail' => true,

            # allow access for non-activated users
            'loginNotActiv' => false,

            # activate user on registration (only sendActivationMail = false)
            'activeAfterRegister' => false,

            # automatically login from registration
            'autoLogin' => true,

            # registration path
            'registrationUrl' => array('/user/registration'),

            # recovery password path
            'recoveryUrl' => array('/user/recovery'),

            # login form path
            'loginUrl' => array('/user/login'),

            # page after login
            'returnUrl' => array('/user/profile'),

            # page after logout
            'returnLogoutUrl' => array('/user/login'),
        ),
        #...
    ),

    #...
    // application components
    'components'=>array(
    #...
        'db'=>array(
        #...
            'tablePrefix' => 'tbl_',
        #...
        ),
        #...
        'user'=>array(
            // enable cookie-based authentication
            'class' => 'WebUser',
        ),
    #...
    ),
    #...
);

Change your config console:, (*3)

return array(
    #...
    'modules'=>array(
        #...
        'user'=>array(
            # encrypting method (php hash function)
            'hash' => 'md5',

            # send activation email
            'sendActivationMail' => true,

            # allow access for non-activated users
            'loginNotActiv' => false,

            # activate user on registration (only sendActivationMail = false)
            'activeAfterRegister' => false,

            # automatically login from registration
            'autoLogin' => true,

            # registration path
            'registrationUrl' => array('/user/registration'),

            # recovery password path
            'recoveryUrl' => array('/user/recovery'),

            # login form path
            'loginUrl' => array('/user/login'),

            # page after login
            'returnUrl' => array('/user/profile'),

            # page after logout
            'returnLogoutUrl' => array('/user/login'),
        ),
        #...
    ),
    #...
);

Install

Run command: yiic migrate --migrationPath=user.migrations, (*4)

Input admin login, email and password, (*5)

The Versions

24/04 2017

dev-master

9999999-dev http://yii-user.2mx.org/

Yii PHP Framework extension for registration and management users accounts.

  Sources   Download

The Requires

 

user yii account