Skip to content

Allow extra fields on memory users config. #40091

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
acantepie opened this issue Feb 4, 2021 · 3 comments
Closed

Allow extra fields on memory users config. #40091

acantepie opened this issue Feb 4, 2021 · 3 comments

Comments

@acantepie
Copy link

Description
Actually, if you use memory provider, you can only define few attributes (username, password, roles).
It will be nice, if you can define custom attributes.

Example
security.yml

security:
    providers:
        app_provider:
            memory:
                users:
                    adrien:  { password: pwd, roles: ['ROLE_USER'], extra: {gender: m} }

Somewhere.php
$user->getExtraFields()['gender'];
Class Symfony\Component\Security\Core\User\User already has $extraFields attribute.

@noniagriconomie
Copy link
Contributor

I can try working on this and will open a PR very soon

@noniagriconomie
Copy link
Contributor

@acantepie this issue should be closed as PR wont be merged for now
as a solution it is proposed to leverage an internal memory provider as explain in the PR comments flow :)

@fabpot
Copy link
Member

fabpot commented Mar 3, 2021

Closing as a won’t fix

@fabpot fabpot closed this as completed Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants