PHP code example of vasadibt / yii2-user

1. Go to this page and download the library: Download vasadibt/yii2-user 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/ */

    

vasadibt / yii2-user example snippets


return [
    // ...
    'bootstrap' => [
        // ...
        'auth',
    ],
    // ...
    'modules' => [
        // ...
        'auth' => [
            'class' => 'vasadibt\materialdashboard\Module',
        ],
    ],
    // ...
    
    'as access' => [
        'class' => \yii\filters\AccessControl::class,
        'rules' => [
            // ...    
            [
                'controllers' => [
                    'auth/*',
                ],
                'allow' => true,
            ],
            // ...
        ],
    ],
];

class User extends \yii\db\ActiveRecord implements \yii\web\IdentityInterface
{
    // ....
}

class User extends \yii\db\ActiveRecord implements \vasadibt\materialdashboard\models\ExtendedIdentityInterface
{
    // todo: add missing functions
}
bash
php composer.phar