You are here

password_policy_password_tab.install in Password Policy 6

Same filename and directory in other branches
  1. 7 contrib/password_tab/password_policy_password_tab.install

Password policy password tab module installation and upgrade code.

File

contrib/password_tab/password_policy_password_tab.install
View source
<?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');
  }
}

Functions