yii2-module / yii2-user
用于管理用户认证机制的模块
7.0.5
2024-07-31 16:51 UTC
Requires
- php: >=8.0
- php-extended/php-basic-console-logger: ^7
- php-extended/php-email-address-object: ^7
- php-extended/php-multiple-logger: ^7
- php-extended/php-rbac-object: ^7
- php-extended/php-uuid-object: ^7
- yii2-extended/yii2-module-metadata-object: ^7
- yii2-extended/yii2-psr3-logger-bridge: ^7
- yii2-module/yii2-module-helper: ^7
- yiisoft/yii2: ^2
- yiisoft/yii2-authclient: ^2
- yiisoft/yii2-bootstrap5: ^2
- yiisoft/yii2-swiftmailer: ^2
Requires (Dev)
README
一个用于管理用户认证机制的模块。
安装
此库的安装通过composer完成,所有类的自动加载都通过它们的自动加载器完成。
- 从他们的网站下载
composer.phar
。 - 然后运行以下命令将此库作为依赖项安装
php composer.phar install yii2-module/yii2-user ^7
配置
此模块需要在配置级别设置以下组件
- 'db_user' 应该是一个
\yii\db\Connection
如果您已经有数据库连接,可以使用以下技巧
'db_user' => function() { return \Yii::$app->get('db'); },
其中 'db' 是您数据库连接的ID。
此模块使用以下参数在配置级别设置
- NONE
然后应按以下方式配置模块(在 console.php
或 web.php
中)
$config = [
...
'components' => [
...
'user' => [
'class' => 'yii\web\User',
'identityClass' => 'Yii2Module\Yii2User\Components\UserIdentity',
'enableAutoLogin' => true,
'loginUrl' => ['user/security/signup'],
],
'authManager' => [
'class' => 'Yii2Module\Yii2User\Components\RbacManager',
],
...
],
...
'modules' => [
...
'user' => [
'class' => 'Yii2Module\Yii2User\UserModule',
],
...
],
...
];
功能
此模块包含以下功能
功能名称 | 状态 |
---|---|
自动删除未注册用户 | 已实现 |
电子邮件队列 | 已实现 |
> 注册确认电子邮件 | 已实现 |
> 注册冒名顶替电子邮件 | 待定 |
登录表单 | 已实现 |
登录确认 | 已实现 |
注册表单 | 已实现 |
英语翻译 | 待定 |
法语翻译 | 待定 |
用户管理 | 待定 |
> 更改用户状态 | 待定 |
> 将用户分配到组 | 待定 |
> 从组中删除用户 | 待定 |
> 将访问权限分配给用户 | 待定 |
> 从用户中删除访问权限 | 待定 |
> 禁止用户 | 待定 |
> 强制用户重置密码 | 待定 |
> > 重置密码信息电子邮件 | 待定 |
> 查看有用户的所有组 | 待定 |
> 查看有用户的所有访问 | 待定 |
组管理 | 待定 |
> 创建组 | 待定 |
> 修改组 | 待定 |
> > 将用户分配到组 | 待定 |
> > 从组中删除用户 | 待定 |
> > 将访问权限分配给组 | 待定 |
> > 从组中删除访问权限 | 待定 |
> 删除组 | 待定 |
> 查看组中的所有用户 | 待定 |
> 查看组的所有访问 | 待定 |
访问管理 | 待定 |
> 从模块中创建访问 | 待定 |
> 将访问权限分配给用户 | 待定 |
> > 分配信息电子邮件 | 待定 |
> > 删除信息电子邮件 | 待定 |
> 将访问权限分配给组 | 待定 |
> > 分配信息电子邮件 | 待定 |
> > 删除信息电子邮件 | 待定 |
> 查看有访问的组 | 待定 |
> 查看有访问的用户 | 待定 |
以下是作为灵感来源的模块列表
https://packagist.org.cn/explore/?query=yii2-user
- https://github.com/2amigos/yii2-usuario
- https://github.com/amnah/yii2-user
- https://github.com/communityii/yii2-user
- https://github.com/cinghie/yii2-user-extended
- https://github.com/dektrium/yii2-user
- https://github.com/johnitvn/yii2-user-plus
- https://github.com/krivochenko/yii2-users
- https://github.com/nkostadinov/yii2-user
- https://github.com/portalium/yii2-user
- https://github.com/thefx/yii2-user
- https://github.com/vova07/yii2-users-module
- https://github.com/wdmg/yii2-users
- https://github.com/yii2mod/yii2-user
- https://github.com/yiier/yii2-user-setting
许可证
MIT (见许可证文件)