<?php
// $Id: disablepwstrength.module,v 1.4 2010/02/15 18:33:32 mcrittenden Exp $

/**
 * @file Disable password strength checker.
 *
 * Code originally taken from from
 * http://www.drupalcoder.com/story/409-disabling-password-check-in-drupal-6
 *
 */

/**
 * Implementation of hook_init().
 */
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');
  }
}

