PHP code example of azamath / yii-account
1. Go to this page and download the library: Download azamath/yii-account library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
azamath / yii-account example snippets
'modules' => array(
'account' => array(
'class' => '\nordsoftware\yii_account\Module',
),
),
'components' => array(
'user' => array(
'class' => '\nordsoftware\yii_account\components\WebUser',
),
),
'commandMap' => array(
'account' => array(
'class' => '\nordsoftware\yii_account\commands\AccountCommand',
),
),
'aliases' => array(
'\nordsoftware\yii_account' => __DIR__ . '/relative/path/to/yii-account/src',
'\YiiPassword' => __DIR__ . '/relative/path/to/yiipassword/src',
'\RandomLib' => __DIR__ . '/relative/path/to/randomlib/lib',
'\SecureLib' => __DIR__ . '/relative/path/to/securelib/lib',
),
'account' => array(
'class' => '\nordsoftware\yii_account\Module',
'classMap' => array(
'account' => 'MyAccount', // defaults to \nordsoftware\yii_account\models\ar\Account
),
),
array(
'account' => array(
'class' => '\nordsoftware\yii_account\Module',
'controllerMap' => array(
'authorize' => 'AuthorizeController', // defaults to \nordsoftware\yii_account\controllers\AuthorizeController
),
),
),
'account' => array(
'class' => 'MyAccountModule',
),
bash
php composer.phar
bash
php yiic.php migrate --migrationPath=account.migrations
bash
index.php?r=account
bash
php yiic.php account create --username=demo --password=demo
bash
export DB_HOST=<YOUR-DB-HOST>
export DB_NAME=<YOUR-DB-NAME>
export DB_USER=<YOUR-DB-USER>
export DB_PASS=<YOUR-DB-PASS>
export BASE_URL=<YOUR-BASE-URL>
erb tests/app/config/bootstrap.php.erb > tests/app/config/bootstrap.php
erb codeception.yml.erb > codeception.yml
erb tests/acceptance.suite.yml.erb > tests/acceptance.suite.yml