定制 worstinme/yii2-user 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

worstinme/yii2-user

最新稳定版本:1.0.2

Composer 安装命令:

composer require worstinme/yii2-user

包简介

Yii2 module for user auth

README 文档

README

In developing. Use at your own risk

User Auth / DB-RBAC / AuthClient module stiled with Uikit Framework.

Latest Stable Version Total Downloads

Installation

The preferred way to install this extension is through composer.

Either run

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

or add

"worstinme/yii2-user": "^1.0.0"

to the require section of your composer.json file.

Required configurations

'modules' => [
    'user' => [
        'class' => 'worstinme\user\Module',
    ],
    'useradmin' => [
        'class' => 'worstinme\user\backend\Module',
    ],
    ....
 ],
'components' => [
	'user' => [
        'class'=>'worstinme\user\User',
        'identityClass' => 'worstinme\user\models\User',
        'enableAutoLogin' => true,
        'loginUrl'=>['/user/default/login'],
    ],
    'authClientCollection' => [
        'class' => 'yii\authclient\Collection',
        'clients' => [
            'google' => [
                'class' => 'yii\authclient\clients\GoogleOpenId'
            ],
            'facebook' => [
                'class' => 'yii\authclient\clients\Facebook',
                'clientId' => 'facebook_client_id',
                'clientSecret' => 'facebook_client_secret',
            ],
            // etc.
        ],
    ]
    //	...
]

RBAC configurations

to web.php & console.php components section

    'authManager' => [
            'class' => 'yii\rbac\DbManager',
    ],
]

& migrations

$ yii migrate --migrationPath=@yii/rbac/migrations/

Then, use migrations to create user tables & default user administrator:administrator with admin role(don't forget to change it's default password).

$ yii migrate --migrationPath=@worstinme/user/migrations/

统计信息

  • 总下载量: 1.05k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-10-03