Skip to content
Snippets Groups Projects

Issue #3442714 by ericgsmith, Mingsong: AJAX error when password field is hidden

Open Mingsong requested to merge issue/password_policy-3442714:3442714-pass-readonly into 4.0.x
1 file
+ 3
3
Compare changes
  • Side-by-side
  • Inline
+ 3
3
@@ -71,9 +71,9 @@ function password_policy_form_user_form_alter(&$form, FormStateInterface $form_s
$form['field_password_expiration']['#access'] = FALSE;
$form['field_pending_expire_sent']['#access'] = FALSE;
}
// Load form if relevant.
if (\Drupal::service('password_policy.validation_manager')->tableShouldBeVisible()) {
$password_mutable = $form['account']['pass']['#access'] ?? TRUE;
// Load form if relevant and password is mutable.
if (\Drupal::service('password_policy.validation_manager')->tableShouldBeVisible() && $password_mutable) {
$form['account']['password_policy_status'] = [
'#type' => 'item',
'#theme' => 'password_policy_status',
Loading