Problem/Motivation

In Drupal 7, this piece of code is used to disable the user.module password javascript:

/**
 * Implements hook_element_info_alter().
 */
function password_strength_element_info_alter(&$types) {
  // Remove user_form_process_password_confirm process callback from
  // password_confirm element. This will remove the password strength
  // checker on password fields.
  if (isset($types['password_confirm']['#process'])) {
    $process = 'user_form_process_password_confirm';
    if (($position = array_search($process, $types['password_confirm']['#process'])) !== FALSE) {
      unset($types['password_confirm']['#process'][$position]);
    }
  }
}

However Drupal 6 doesn't offer hook_element_info_alter() or similar. The js is added by _user_password_dynamic_validation() which is called in user_edit_form().

Proposed resolution

Remaining tasks

User interface changes

API changes

CommentFileSizeAuthor
#3 2297463_3_user_js_css.patch389 bytesscor
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

scor’s picture

Issue summary: View changes
scor’s picture

Looks like we have 2 solutions:
- hide the span.password-strength in CSS. This class is only used in core and not in the password strength module (we use longer, more specific class names)
- hide the span.password-strength JS... except that $('.password-strength').hide(); doesn't seem to cut it, maybe because user.js manipulates it after typing the password.

scor’s picture

Status: Active » Needs review
FileSize
389 bytes
coltrane’s picture

Project: Password Strength2 » Password Strength
Version: » 6.x-1.x-dev

(moving to Password Strength project)

  • scor committed 21fa8a8 on 6.x-2.x
    Issue #2297463 by scor: Neutralize user.js behavior in Drupal 6
    
scor’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev
Status: Needs review » Fixed

I've committed this patch. I would love it if someone would know a better way of achieving goal.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.