Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

User Bundle Laravel Package

bengor-user/user-bundle

Fully featured, well-tested Symfony user bundle built on BenGorUser. Supports multiple user types and HTML/JSON renderers. Includes registration (confirmation/invites), login/logout, JWT auth, password reset, user removal, role management, and token purging.

View on GitHub
Deep Wiki
Context7

Domain events and subscribers

The BenGorUser's User library has some built-in subscribers that need to be added to make them work, the bundle does not register them by default.

The declaration mainly relies in the tag name bengor_user_your_user_type_event_subscriber and the subscribe to parameter. In the tag name you will need to change your_user_type by your user type and in the subscribes to you will need to add a fully qualified name you want to listen to.

A whole list of default events is available in the BenGorUser's standalone library docs

User Invited Event Subscriber:

app.invite_url_generator:
    public: false
    class: BenGorUser\SymfonyRoutingBridge\Infrastructure\Routing\SymfonyUserUrlGenerator
    arguments:
        - "[@router](https://github.com/router)"
        - bengor_user_your_user_type_sign_up

app.invited_mailer_subscriber:
    class: BenGorUser\User\Domain\Event\UserInvitedMailerSubscriber
    arguments:
        - "[@bengor_user](https://github.com/bengor_user).mailer.swift_mailer"
        - "[@bengor_user](https://github.com/bengor_user).mailable_factory.invite"
        - "[@app](https://github.com/app).invite_url_generator"
    tags:
        -
            name: bengor_user_your_user_type_event_subscriber
            subscribes_to: BenGorUser\User\Domain\Model\Event\UserInvited
        -
            name: bengor_user_your_user_type_event_subscriber
            subscribes_to: BenGorUser\User\Domain\Model\Event\UserInvitationTokenRegenerated

User Registered Event Subscriber:

app.sign_up_url_generator:
    public: false
    class: BenGorUser\SymfonyRoutingBridge\Infrastructure\Routing\SymfonyUserUrlGenerator
    arguments:
        - "[@router](https://github.com/router)"
        - bengor_user_your_user_type_enable

app.registered_mailer_subscriber:
    class: BenGorUser\User\Domain\Event\UserRegisteredMailerSubscriber
    arguments:
        - "[@bengor_user](https://github.com/bengor_user).mailer.swift_mailer"
        - "[@bengor_user](https://github.com/bengor_user).mailable_factory.sign_up"
        - "[@app](https://github.com/app).sign_up_url_generator"
    tags:
        -
            name: bengor_user_your_user_type_event_subscriber
            subscribes_to: BenGorUser\User\Domain\Model\Event\UserRegistered

User Request Remember Password Event Subscriber:

app.request_remember_password_url_generator:
    public: false
    class: BenGorUser\SymfonyRoutingBridge\Infrastructure\Routing\SymfonyUserUrlGenerator
    arguments:
        - "[@router](https://github.com/router)"
        - bengor_user_your_user_type_change_password

app.request_remember_password_mailer_subscriber:
    class: BenGorUser\User\Domain\Event\UserRememberPasswordRequestedMailerSubscriber
    arguments:
        - "[@bengor_user](https://github.com/bengor_user).mailer.swift_mailer"
        - "[@bengor_user](https://github.com/bengor_user).mailable_factory.request_remember_password"
        - "[@app](https://github.com/app).request_remember_password_url_generator"
    tags:
        -
            name: bengor_user_your_user_type_event_subscriber
            subscribes_to: BenGorUser\User\Domain\Model\Event\UserRememberPasswordRequested

Remember that alternatively you can use the plain strategy of the user url generator avoiding the SymfonyRoutingBridge dependency. The following code is a declaration of this implementation:

app.invite_url_generator:
    public: false
    class: BenGorUser\User\Infrastructure\Routing\PlainUserUrlGenerator
    arguments:
        - "http://kreta.io?token={token}"
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
gmostafa/php-graphql-client
xeviant/paystack
snowsoft/faker
meditationsteps/blogetc
animalyoung/laravel-influxdb
onix-solutions/sms-telera
lonely-lights/prosetta
oxygen/data
oxygen/core
jengo/base
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin
artisan-build/community-prompts
vleroy/smart
ayles-software/laravel-australian-public-holidays
cboxdk/laravel-id-spatie
cboxdk/laravel-id-billing
cboxdk/laravel-id-billing-bridge
simple-as-fuck/php-performance-log