agence-adeliom/easy-admin-user-bundle

一个为EasyAdmin提供的支持基本用户认证流程的Symfony扩展包

2.0.122 2024-05-29 09:45 UTC

README

Adeliom Quality gate

Easy Admin User Bundle

在Easyadmin中提供用户认证和密码重置的基本集成。

功能

  • 完整的用户流程
  • 一个生成用户账户的命令
  • 用于管理用户的Easyadmin CRUD界面

版本

使用Symfony Flex进行安装

添加我们的recipes端点

{
  "extra": {
    "symfony": {
      "endpoint": [
        "https://api.github.com/repos/agence-adeliom/symfony-recipes/contents/index.json?ref=flex/main",
        ...
        "flex://defaults"
      ],
      "allow-contrib": true
    }
  }
}

使用composer安装

composer require agence-adeliom/easy-admin-user-bundle

设置数据库

使用doctrine迁移

php bin/console doctrine:migration:diff
php bin/console doctrine:migration:migrate

不使用

php bin/console doctrine:schema:update --force

使用/示例

easy-admin:add-user 命令创建新用户并将它们保存到数据库中

bin/console easy-admin:add-user email password

默认情况下,命令创建普通用户。要创建管理员用户,请添加--admin选项

bin/console easy-admin:add-user email password --admin

或者要创建超级管理员用户,请添加--super-admin选项

bin/console easy-admin:add-user email password --super-admin

如果您省略了两个必填参数中的任何一个,命令将提示您提供缺失的值

# command will ask you for the password
bin/console easy-admin:add-user email

# command will ask you for the email and the password
bin/console easy-admin:add-user

文档

请在此查看

许可证

MIT

作者