What's the status?

Comments

mrfelton’s picture

Subscribe. Need this for D7 too.

pgough’s picture

same here

kevinquillen’s picture

Not sure if you want to use this solution, but this is how I did it in D7:

form#user-register-form div.password-strength {
  display: none;
}

Working on fix for the password helper.

Sidenote, is there any way to get these in as form items so they can be moved or placed in other areas in a tpl?

rafamd’s picture

nice module to have for D7 ..

charlie-s’s picture

If you download the module and look at the code, you'll see the entire module consists of 1 simple function:

function disablepwstrength_init() {
  // If the user is currently on a user/* page or the admin/user/user page, insert the JS.
  if (arg(0) === 'user' || (arg(0) === 'admin' && arg(1) === 'user' && arg(2) === 'user' )) {
    drupal_add_js('Drupal.behaviors.password = function () {};', 'inline', 'footer');
  }
}

I would advise against ever using hook_init() for a function that doesn't need to run on every page load. It's minor, but that's an extra function call that's occurring all the time, whether they're on the user registration page or not. I would recommend instead inserting something like this into your theme's template.php file:

if (arg(0) == 'user') {
  drupal_add_js('Drupal.behaviors.password = function () {};', 'inline', 'footer');
}

This does the same thing without the overhead of installing a new module. You can put this inside phptemplate_preprocess_page().

mrfelton’s picture

Perhaps this module might be made more efficient by using hook_form_FORM_ID_alter to inject the javascript on only the specific forms that require it.

milenv’s picture

In file disablepwstrength.module change the code in line 18
from
drupal_add_js('Drupal.behaviors.password = function () {};', 'inline','footer');
to
drupal_add_js('Drupal.behaviors.password = function () {};', array('type' => 'inline', 'scope' => 'footer'));

in file disablepwstrength.info replace every 6.x to 7.x ,
And you are ready to use the module in Drupal 7

mrfelton’s picture

Status: Active » Fixed

I have just cut a Drupal 7 version of this module which uses hook_form_FORM_ID_alter() to apply the javascript, so this only gets called on the two pages where it's required. Due to some issue on drupal.org, I'm unable to create a release node for this (see #1288006: Unable to create release snapshot for Password Strength Disabler 7.x-1.0) so you'll have to grab it from git for now.

jherencia’s picture

Status: Fixed » Closed (fixed)

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