Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Allow extra fields on memory users config. #40091

Closed
@acantepie

Description

@acantepie

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.

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