PHPackages                             sokolby/skl-yii2-admin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. sokolby/skl-yii2-admin

ActiveYii2-extension[Authentication &amp; Authorization](/categories/authentication)

sokolby/skl-yii2-admin
======================

Yii 2 user authentication and admin dashboard module

0.9.95(8y ago)154MITPHP

Since Apr 30Pushed 8y ago1 watchersCompare

[ Source](https://github.com/sokolby/skl-yii2-admin)[ Packagist](https://packagist.org/packages/sokolby/skl-yii2-admin)[ RSS](/packages/sokolby-skl-yii2-admin/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (2)Versions (33)Used By (0)

Yii 2 Admin
===========

[](#yii-2-admin)

Yii 2 Admin - User authentication module and admin dashboard

New version released 05/24/2017 v.0.9.6
---------------------------------------

[](#new-version-released-05242017-v096)

Based on

Features
--------

[](#features)

- Quick setup - works out of the box so you can see what it does
- Easily [extendable](#how-do-i-extend-this-package)
- Registration using email and/or username
- Login using email and/or username
- Login/register via email (enter email &gt; get link in inbox &gt; click link to login/register)
- Email confirmation (+ resend functionality)
- [Social authentication](SOCIAL.md) (facebook, twitter, google, linkedin, reddit, vkontakte)
- Account page
    - Updates email, username, and password
    - Requires current password
- Profile page
    - Lists custom fields for users, e.g., *full\_name*
- Password recovery
- Admin crud via GridView

Installation
------------

[](#installation)

- Install [Yii 2](http://www.yiiframework.com/download) using your preferred method
- Install package via [composer](http://getcomposer.org/download/) `"amnah/yii2-user": "^5.0"`
- Update config file *config/web.php* and *config/db.php*

```
// app/config/web.php
return [
    'components' => [
        // NOTE: in the yii2-advanced-app, the user component should be updated in
        // 'frontend/config/main.php' and/or 'backend/config/main.php' (OR you can add it
        // to 'common/config' if you remove it from frontend/backend)
        'user' => [
            'class' => 'amnah\yii2\user\components\User',
        ],
        'mailer' => [
            'class' => 'yii\swiftmailer\Mailer',
            'useFileTransport' => true,
            'messageConfig' => [
                'from' => ['admin@website.com' => 'Admin'], // this is needed for sending emails
                'charset' => 'UTF-8',
            ]
        ],
    ],
    'modules' => [
        'user' => [
            'class' => 'amnah\yii2\user\Module',
            // set custom module properties here ...
        ],
    ],
];
// app/config/db.php
return [
    'class' => 'yii\db\Connection',
    // set up db info
];
```

- Run migration file
    - `php yii migrate --migrationPath=@vendor/amnah/yii2-user/migrations`
- Go to your application in your browser
    - `http://localhost/pathtoapp/web/user`
- Log in as admin using `neo/neo` (change it!)
- Set up [module properties](Module.php#L14) as desired
- *Optional* - Update the nav links in your main layout *app/views/layouts/main.php*

```
// app/views/layouts/main.php
