Skip to content

[doctrine-bridge] UserEntityProvider does not set username field on UsernameNotFoundException #39878

Closed
@qurben

Description

@qurben

Symfony version(s) affected: 5.2.1

Description

When logging in with a username which does not exist using EntityUserProvider in doctrine-bridge the Exception thrown does not contain a username. This causes problems with translating the exception.

How to reproduce

Create a login form with UserEntityProvider from doctrine-bridge and try to login with a username which does not exist.

Possible Solution

Similar to InMemoryUserProvider call setUsername to set the username in the exception.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions