Not possible to change username

Created on 31 December 2023, 6 months ago
Updated 11 January 2024, 6 months ago

What the module doing on user-edit page? (field username function email_registration_user_presave).
Module auto-set username as first-path of email name@gmail.com
Drupal:10.2.0 PHP:8.2

email_registration.module

/**
 * Implements hook_ENTITY_TYPE_presave().
 */
function email_registration_user_presave(UserInterface $account) {
  if( \Drupal::routeMatch()->getRouteName() == 'entity.user.edit_form') return; /*+*/
  $name = $account->getAccountName();
🐛 Bug report
Status

Closed: duplicate

Version

2.0

Component

Code

Created by

🇮🇱Israel Promo-IL

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

Comments & Activities

Production build 0.69.0 2024