PHP Class console\controllers\InitAdminController

Below are some common usages of this command: ~~~ # init root user yii init-admin # init root user yii init-admin --username=root --password=qwerty ~~~
Author: Taras Makitra ([email protected])
Inheritance: extends yii\console\Controller
ファイルを表示 Open project: yeesoft/yii2-yee-cms

Public Properties

Property Type Description
$allowOverwrite indicate whether is root user initialization allowed more that one time.
$db the DB connection object or the application component ID of the DB connection.
$defaultAction the default command action.
$email email of root user.
$interactive whether to execute the migration in an interactive mode.
$password password of root user.
$username username of root user.

Public Methods

Method Description
actionInit ( ) Init root user.
beforeAction ( Action $action ) : boolean This method is invoked right before an action is to be executed (after all possible filters.)
options ( $actionId )

Private Methods

Method Description
canUpdateRootUser ( )
createUser ( $username, $password, $email )
validateEmail ( $email )
validatePassword ( $password )
validateUsername ( $username )

Method Details

actionInit() public method

For example, ~~~ yii init-admin yii init-admin --username=admin --password=admin123 ~~~
public actionInit ( )

beforeAction() public method

This method is invoked right before an action is to be executed (after all possible filters.)
public beforeAction ( Action $action ) : boolean
$action yii\base\Action the action to be executed.
return boolean whether the action should continue to be executed.

options() public method

public options ( $actionId )

Property Details

$allowOverwrite public_oe property

indicate whether is root user initialization allowed more that one time.
public $allowOverwrite

$db public_oe property

the DB connection object or the application component ID of the DB connection.
public $db

$defaultAction public_oe property

the default command action.
public $defaultAction

$email public_oe property

email of root user.
public $email

$interactive public_oe property

whether to execute the migration in an interactive mode.
public $interactive

$password public_oe property

password of root user.
public $password

$username public_oe property

username of root user.
public $username