[2.x] Rework username generation save logic

Created on 10 October 2023, about 1 year ago
Updated 23 October 2023, about 1 year ago

Problem/Motivation

Currently, there are a bunch of problems, how a newly added user is handled (saved):
We have two different logics on how we generate a username (see Allow Admin-users set username while user creation Needs work ).
We are currently using "hook_ENTITY_TYPE_insert" which shouldn't be used to modify entity data and results in problems with other modules ( 🐛 Switch to hook_user_presave() for setting username Needs work ).

Furthermore, having a setting to update the username could be beneficial, depending on the username generation approach we are using. ( Update username when updating user entity Needs review ).

Steps to reproduce

Proposed resolution

Discuss and fix the referenced issues here.

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

2.0

Component

Code

Created by

🇩🇪Germany Grevil

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

Comments & Activities

Production build 0.71.5 2024