Drupal coder

Disabling password check in Drupal 6

I've had some clients not wanting the uber cool password strength checking in Drupal 6. Well, here's a very short tip how to disable this.

Just add the following in some javascript (your theme, your module, ...)

<script language="javascript">
// disabling password security check
Drupal.behaviors.password = function(context) {
  return;
}
</script>

Hooray for behaviors!

disable-password-check.png

March 14, 2009Drupal, JavaScript, jQuery

Comments

It's back up now. Thanks for noticing. ;)

egad. where's the snippet?

Thanks for the tip! Very helpful.

Anyway to get rid of the strength feature and keep the password match yes/no? That would be cool.

Also, the strength settings seem severe by default. It can be confusing for general users - a red box usually means something is wrong and you can't go on... and even a password like "dontGuess1t90" gets a "medium" because it doesn't have punctuation. Might not need to nix it all together if could be adjusted so "mycat" gets a thumbs down and "MycAt93" gets a thumbs up. In most circumstances users signing up with the reg form will be assigned very limited permissions anyways - it doesn't need to be a long string of random characters for the level of security I'm worried about.

That my 2 cents. Thanks again!

you can add it to your template.tpl.php file in your theme directory - if you don't have one you can create one and put it in there.

Robert Pope

Yes, you can use it on hook_init with drupal_add_js. Check there for the right paths.

Thanks for the code snippet.
I'm very unsure where to put this code without making it appear on every page.
Couldn't this be done using drupal_add_js() ?
And couldn't that be done inside a hook so he snippet only shows on the right page?

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options