8000 [Security] getUsername in UserInterface is confusing · Issue #10316 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
[Security] getUsername in UserInterface is confusing #10316
Closed
@gedimin45

Description

@gedimin45

Symfony Security component's UserInterface defines a method getUsername. The purpose of this method is to provide an identifier for the user. In some cases however, a username is not used as the identifier for a user (i.e. in Facebook you create a username only after registration, the email is used instead to identify the user; e-commerce sol 5D58 utions, in order to simplify user registration, also use the email to identify).
IMO, the user interface should not define a getUsername method, but rather a getIdentifier. I believe that this was the original intention of the getUsername method, but the naming turned out to be somewhat confusing.
If there would be interest and +1s from the community and the maintainers, I would gladly submit a PR respecting BC.

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

      0