password_policy_password_tab.install in Password Policy 6
Same filename and directory in other branches
Password policy password tab module installation and upgrade code.
File
contrib/password_tab/password_policy_password_tab.installView 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
Name | Description |
---|---|
password_policy_password_tab_6001 | Set default value for password change URL. |
password_policy_password_tab_install | Implements hook_install(). |
password_policy_password_tab_uninstall | Implements hook_uninstall(). |