<?php

/**
 * @file
 * Password policy password tab module installation and upgrade code.
 */

/****************************************************************************/
/* Module installation/uninstallation                                       */
/****************************************************************************/

/**
 * Implements hook_install().
 */
function password_policy_password_tab_install() {
  if (variable_get('password_policy_change_url', NULL) == NULL) {
    variable_set('password_policy_change_url', 'password');
  }
}

/**
 * Implements hook_uninstall().
 */
function password_policy_password_tab_uninstall() {
  variable_del('password_policy_password_tab_redirect');

  if (variable_get('password_policy_change_url', NULL) == 'password') {
    variable_del('password_policy_change_url');
  }
}

/**
 * Set default value for password change URL.
 */
function password_policy_password_tab_6001() {
  if (variable_get('password_policy_change_url', NULL) == NULL) {
    variable_set('password_policy_change_url', 'password');
  }
}
