PHPackages                             sidus/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. sidus/user-bundle

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

sidus/user-bundle
=================

User management for Symfony 6.3+

v3.0.0(3w ago)2360MITPHPPHP &gt;=8.1

Since Mar 22Pushed 3w ago1 watchersCompare

[ Source](https://github.com/VincentChalnot/SidusUserBundle)[ Packagist](https://packagist.org/packages/sidus/user-bundle)[ Docs](https://github.com/VincentChalnot/SidusUserBundle)[ RSS](/packages/sidus-user-bundle/feed)WikiDiscussions v2.x Synced today

READMEChangelogDependencies (27)Versions (11)Used By (0)

Sidus User Bundle
=================

[](#sidus-user-bundle)

User management for Symfony 6.3+: authentication, password reset/recovery, user profile editing, roles/permissions with a proper hierarchy tree, and optional group management — plus an optional CRUD admin backend when `sidus/admin-bundle` is available.

- **License:** MIT
- **Author:** Vincent Chalnot ([sidus.fr](https://sidus.fr))
- **Repository:**

Features
--------

[](#features)

- `User` and `Group` Doctrine entities (ULID identifiers, bigint PK, `ROLE_USER` / `ROLE_ADMIN` built in, many-to-many groups).
- Login / logout, "lost password", and "reset password" flows out of the box, each with HTML views and translated flash messages (`en`/`fr` included).
- Self-service profile edition and password change actions for authenticated users.
- A role hierarchy service (`Sidus\UserBundle\Security\Core\Role\RoleHierarchy`) that exposes `security.role_hierarchy.roles` as a browsable tree (`LeafRole`), used by the role-picker form type.
- Transactional email (new account + password reset) via `symfony/mailer`, with an event (`MailEvent`) to customize the generated `TemplatedEmail` before sending.
- Console commands to create, promote/demote and change the password of users without going through the UI.
- `AuthorableInterface` + a Doctrine subscriber that auto-fills `createdBy`/`updatedBy`on any entity that implements it.
- Optional admin CRUD screens for users/groups, built on `sidus/admin-bundle`.

Requirements
------------

[](#requirements)

- PHP &gt;= 8.1
- Symfony &gt;= 6.3 (`dependency-injection`, `http-foundation`, `http-kernel`, `security-core`, `translation`, `console`, `uid`, `validator`, `options-resolver`, `password-hasher`)
- `doctrine/orm` &gt;= 2.9

Optional, depending on which features you use:

- `symfony/mailer` + `symfony/mime` — sending account/reset emails.
- `symfony/form` — all the bundle's forms (login, profile, password, roles...).
- `symfony/routing` + `symfony/twig-bridge` + `sidus/template-bundle` + `sidus/admin-bundle` — the admin backend (`enable_admin: true`).

Installation
------------

[](#installation)

```
composer require sidus/user-bundle
```

Register the bundle (skip if you use Symfony Flex, which does this automatically):

```
// config/bundles.php
Sidus\UserBundle\SidusUserBundle::class => ['all' => true],
```

The bundle prepends its own Doctrine attribute mapping and (when `sidus/template-bundle` is present) registers its login/lost-password/reset-password/ profile templates with `sidus_template` — no extra Doctrine or template config needed.

Update your schema (or generate a migration) once `User`/`Group` are mapped:

```
php bin/console doctrine:schema:update --force
# or, with doctrine-migrations-bundle:
php bin/console make:migration
```

Configuration
-------------

[](#configuration)

```
# config/packages/sidus_user.yaml
sidus_user:
    home_route: app_home           # route to redirect to once authenticated (required, used everywhere)
    company_title: 'Acme Corp'     # shown in transactional emails (required)
    enable_admin: true             # load the admin CRUD routes/services (default: true)
    mailer:
        from_email: no-reply@example.com
        from_name: 'Acme Corp'
        support_email: support@example.com
        support_name: 'Acme Support'
    templates:
        new_user:
            html: '@SidusUser/Email/newUser.html.twig'
            text: '@SidusUser/Email/newUser.txt.twig'
        reset_password:
            html: '@SidusUser/Email/resetPassword.html.twig'
            text: '@SidusUser/Email/resetPassword.txt.twig'
```

`mailer.*` is required as soon as the `mailer` key is present — the extension loads `Resources/config/mailer.yaml` (registering `UserMailer`) only if the section is set, so omit it entirely for setups that never send mail (e.g. admin-created users with a manually assigned password).

Wire the security firewall to the bundle's routes and to Doctrine's user provider, e.g.:

```
# config/packages/security.yaml
security:
    password_hashers:
        Sidus\UserBundle\Entity\User: auto

    providers:
        sidus_user:
            entity:
                class: Sidus\UserBundle\Entity\User
                property: email

    firewalls:
        main:
            provider: sidus_user
            form_login:
                login_path: sidus.user.login
                check_path: sidus.user.login_check
            logout:
                path: sidus.user.logout

    role_hierarchy:
        ROLE_ADMIN: ROLE_USER
```

Import the routes:

```
# config/routes/sidus_user.yaml
sidus_user:
    resource: '@SidusUserBundle/Resources/config/routes.yaml'
```

Routes
------

[](#routes)

NamePathPurpose`sidus.user.login``/login`Login form`sidus.user.login_check``/login_check`Firewall check target (intercepted by `form_login`; falls back to redirecting to `sidus.user.login` if hit directly)`sidus.user.logout``/logout`Firewall logout target`sidus.user.lost_password``/login/lost-password`Request a password reset email`sidus.user.reset_password``/login/reset-password`Consume the reset token, set a new password`sidus.user.profile``/profile`Edit own email/profile`sidus.user.profile.change_password``/profile/change-password`Change own passwordAdmin routes are provided by `Resources/config/admin.yaml` (`Action\Admin\*`) and only tag the controllers as services — actual route definitions/registration are driven by `sidus/admin-bundle`'s own admin configuration, which is out of scope for this bundle.

Console commands
----------------

[](#console-commands)

```
php bin/console sidus:user:create [username] [--password=] [--admin] [--if-not-exists]
php bin/console sidus:user:promote [username] [--demote]
php bin/console sidus:user:change-password [username] [--password=]
```

All arguments/options are prompted interactively when omitted (non-interactive shells require them explicitly). Leaving `--password` blank triggers a "reset password" email request instead of setting a password directly.

Domain model
------------

[](#domain-model)

- `Sidus\UserBundle\Model\AdvancedUserInterface` — extends Symfony's `PasswordAuthenticatedUserInterface`/`UserInterface`/`EquatableInterface` with role/admin helpers. Implement this (or reuse `Entity\User` + `Entity\RoleCollectionTrait`) if you need a custom user entity.
- `Sidus\UserBundle\Domain\Manager\UserManagerInterface` — the single entry point for creating/persisting users, hashing passwords, and issuing password-reset requests (`Infrastructure\Manager\UserManager` is the Doctrine-backed implementation).
- `Sidus\UserBundle\Model\AuthorableInterface` — implement on any Doctrine entity to get `createdBy`/`updatedBy` auto-populated from the current security token (`Event\AuthorableSubscriber`).
- `Sidus\UserBundle\Model\Event\MailEvent` — dispatched before every transactional email is sent; listen to it to add headers, attachments, or override recipients.

License
-------

[](#license)

MIT — see [LICENSE](LICENSE).

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance94

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~152 days

Recently: every ~255 days

Total

9

Last Release

26d ago

Major Versions

v1.x-dev → v2.0.02023-08-31

v2.x-dev → v3.0.02026-07-22

PHP version history (2 changes)v1.0.0PHP &gt;=8.0

v2.0.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/0d58f1d81808beea6dab7aec03b0268082fe12bf46c852f14d98d7b900ea1304?d=identicon)[VincentChalnot](/maintainers/VincentChalnot)

---

Top Contributors

[![VincentChalnot](https://avatars.githubusercontent.com/u/1535893?v=4)](https://github.com/VincentChalnot "VincentChalnot (18 commits)")

---

Tags

Authenticationusergroup

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[sylius/sylius

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

8.5k6.0M777](/packages/sylius-sylius)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.9M535](/packages/pimcore-pimcore)[chameleon-system/chameleon-base

The Chameleon System core.

1029.4k6](/packages/chameleon-system-chameleon-base)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k18.3M428](/packages/easycorp-easyadmin-bundle)[contao/core-bundle

Contao Open Source CMS

1301.7M3.1k](/packages/contao-core-bundle)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9626.1k68](/packages/open-dxp-opendxp)

PHPackages © 2026

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