Patch to only alter "user" category

Created on 12 August 2015, about 10 years ago
Updated 12 July 2025, 4 months ago

Hey,

great module. THX a lot!

But if there are multiple user_profile_form tabs (e.g. "Simplenews") there should be a check if we are in the correct user_category

auto_username.module (round about line 50)

/**
 * Implements hook_form_FORM_ID_alter().
 */
function auto_username_form_user_profile_form_alter(&$form, &$form_state, $form_id) {
  if($form['#user_category'] == 'account') {
    $form['account']['name']['#type'] = 'hidden';
  }
}
💬 Support request
Status

Active

Version

2.0

Component

Code

Created by

🇩🇪Germany ckidow

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024