PHPackages                             draw/user-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. draw/user-bundle

ActiveSymfony-bundle[Authentication &amp; Authorization](/categories/authentication)

draw/user-bundle
================

0.39.2(2mo ago)023.5k↓40%3MITPHPPHP &gt;=8.5CI failing

Since Apr 12Pushed 2mo agoCompare

[ Source](https://github.com/mpoiriert/user-bundle)[ Packagist](https://packagist.org/packages/draw/user-bundle)[ RSS](/packages/draw-user-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (40)Versions (266)Used By (3)

DrawUserBundle
==============

[](#drawuserbundle)

Enable 2FA for admin
--------------------

[](#enable-2fa-for-admin)

1. Install and configure scheb/2fa-bundle

```
composer ruquire scheb/2fa-bundle scheb/2fa-totp scheb/2fa-qr-code

```

config/packages/scheb\_2fa.yaml

```
scheb_two_factor:
    totp:
        enabled: true
        server_name: draw.example.com
        issuer: Draw
        template: '@DrawUser/security/2fa_login.html.twig'
    security_tokens:
        - Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken
        - Symfony\Component\Security\Guard\Token\PostAuthenticationGuardToken
```

config/routes/scheb\_2fa.yaml

```
admin_2fa_login:
    path: /admin/2fa
    defaults:
        _controller: "scheb_two_factor.form_controller::form"

admin_2fa_login_check:
    path: /admin/2fa_check
```

2. Enable two-factor authentication per firewall and configure access\_control for the 2fa routes: config/packages/security.yaml

```
security:
    firewalls:
        admin:
            two_factor:
                provider: app_user_provider_email # If you have more than one user provider
                auth_form_path: admin_2fa_login
                check_path: admin_2fa_login_check

      access_control:
        - { path: ^/admin/2fa, role: IS_AUTHENTICATED_2FA_IN_PROGRESS }
        - { path: ^/admin/logout$, role: IS_AUTHENTICATED_ANONYMOUSLY }
```

3. Implements Draw\\Bundle\\UserBundle\\Security\\TwoFactorAuthenticationUserInterface and use \\Draw\\Bundle\\UserBundle\\Entity\\TwoFactorAuthenticationUserTrait for User entity. Migrate database changes.
4. Enable 2FA in DrawUserBundle.

```
draw_user:
    sonata:
        enabled: true
        user_admin_code: App\Sonata\Admin\UserAdmin
        2fa:
            enabled: true
            field_positions:
                2fa_enabled:
                    #Those are the default
                    list: '_action' #Before the _action list. Dynamically set to _actions for sonata 4.x
                    form: true #at the end of the form
```

Two actions will be available when 2fa is enabled: 2fa-enable and 2fa-disable. The access right are configure via the TwoFactorAuthenticationExtension::getAccessMapping. You can override this by overriding the getAccess method of your UserAdmin class.

###  Health Score

56

—

FairBetter than 98% of packages

Maintenance86

Actively maintained with recent releases

Popularity26

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity83

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 99.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~8 days

Total

264

Last Release

77d ago

PHP version history (6 changes)0.5.0PHP ^7.2

0.7.21PHP ^7.3

0.8.0PHP &gt;=7.4

0.9.31PHP &gt;=8.1

0.10.47PHP &gt;=8.2

0.39.0PHP &gt;=8.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/8bb9496b48abc2bfd37ebafa9cc4b3b1307a369ad27f6514943408d9b5ff18a5?d=identicon)[mpoiriert](/maintainers/mpoiriert)

---

Top Contributors

[![mpoiriert](https://avatars.githubusercontent.com/u/4175616?v=4)](https://github.com/mpoiriert "mpoiriert (503 commits)")[![DumitracheAdrian](https://avatars.githubusercontent.com/u/12441524?v=4)](https://github.com/DumitracheAdrian "DumitracheAdrian (3 commits)")[![kiloumap](https://avatars.githubusercontent.com/u/17480546?v=4)](https://github.com/kiloumap "kiloumap (1 commits)")

---

Tags

symfonyusersonata

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/draw-user-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/draw-user-bundle/health.svg)](https://phpackages.com/packages/draw-user-bundle)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[sonata-project/user-bundle

Symfony SonataUserBundle

3465.6M44](/packages/sonata-project-user-bundle)[web-auth/webauthn-framework

FIDO2/Webauthn library for PHP and Symfony Bundle.

50570.7k1](/packages/web-auth-webauthn-framework)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
