Looking for email address on entity user selection

Created on 18 August 2023, about 1 year ago
Updated 8 November 2023, 10 months ago

Problem/Motivation

By default the entity_autocomplete for user entity works just with usernames. If you look for a user on a such kind of form field, provided results are just the ones that match the name condition.

Anyway, it's even more common that email addresses are used as username, so in my opinion it would be extremely useful to have the mail as a search condition too, available by default.

Steps to reproduce

Look for a user typing its email address on a form field with type "entity_autocomplete" and target_type "user".

Proposed resolution

Update the UserSelection plugin in order to include the user email address as a 'or" condition into the entity query.
Attached the patch with a proposed solution.

Feature request
Status

Needs work

Version

11.0 🔥

Component
User module 

Last updated 1 day ago

Created by

🇮🇹Italy puidu

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024