exoodev/yii2-user

The User extension for the Yii2 framework

Installs: 17

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Forks: 0

Type:yii2-extension

1.0.5 2019-09-25 11:23 UTC

This package is auto-updated.

Last update: 2024-03-25 21:02:56 UTC


README

========================

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist exoo/yii2-user

or add

"exoo/yii2-user": "*"

to the require section of your composer.json.

Usage

Example module configuration:

'modules' => [
    'user' => [
        'class' => 'exoo\user\Module',
        'useRecaptcha' => true,
        'recaptchaOptions' => $params['recaptcha'],
        'robotEmail' => 'no-reply@exoodev.com',
        'urlPrivacyPolicy' => '/agreement/privacy-policy',
    ]
],

Example component configuration:

'components' => [
    'user' => [
        'identityClass' => 'exoo\user\models\User',
        'enableAutoLogin' => true,
        'identityCookie' => ['name' => '_identity-frontend', 'httpOnly' => true],
    ],
    'fileStorage' => [
        'class' => 'exoo\storage\FileStorage',
        'storage' => [
            'class' => 'yii2tech\filestorage\local\Storage',
            'basePath' => '@storage',
            'dirPermission' => 0775,
            'filePermission' => 0755,
        ],
    ],
],