marsoltys/yii2user

安装: 118

依赖: 0

建议者: 0

安全: 0

星星: 1

关注者: 2

分支: 0

开放问题: 0

类型:yii2-extension

1.0.1 2016-07-18 13:29 UTC

This package is not auto-updated.

Last update: 2024-09-20 21:57:45 UTC


README

##注意:这是Yii2-User模块,它是可以在https://yiiframework.cn/extension/yii-user找到的Yii-User的重写版本。

此模块允许您维护用户。

Yii-User安装

下载

https://github.com/marsoltys/yii2user下载或检出(SVN/Git),然后将文件解压到您的protected/modules/user目录下。

Composer

composer require "marsoltys/yii2user:*",

配置

Change your config web.php:
        #...
        'modules'=>[
            #...
            'user' => [
                'class' => 'marsoltys\yii2user\Module',
                
                # OPTIONALLY YOU CAN CONFIGURE THESE PROPERTIES
                #'userClass' => 'marsoltys\yii2user\components\User', # User component class, you can change this to be your own class but it must be extended from class provided in this comment
                #'identityClass' => 'marsoltys\yii2user\models\User', # User Identity class, you can change this to be your own class but it must be extended from class provided in this comment
                #'userModel' => 'marsoltys\yii2user\models\User',     # User model class, you can change this to be your own class but it must be extended from class provided in this comment
            ],
            #...
        ],

修改您的控制台配置

    return array(
        #...
        'modules'=>[
            #...
            
            'user' => [
                'class' => 'marsoltys\yii2user\Module'
            ],
            
            #...
        ]
        #...
    ); 

安装

  1. 运行控制台命令

     php yii migrate --migrationPath=@marsoltys/yii2user/migrations
    
  2. 当提示时,在控制台提供管理员登录名、电子邮件和密码。

##注意##

请注意,"user"组件将通过此用户模块进行配置。要配置用户组件类,请参阅上面“配置”部分的web.php配置文件中的注释。

##待办事项##

  • 修复“自动完成”和“属于”组件
  • 如果用户详情中发生任何更改,则刷新用户会话(在密码更改后注销用户?)
  • 当管理员创建用户且状态不是活动状态时,添加激活电子邮件选项

##变更日志##

###1.0.0.2###

  • 添加了通过Composer的引导