email_verify.install in Email Verify 7
Same filename and directory in other branches
Install, update and uninstall related functions for the module.
File
email_verify.installView source
<?php
/**
* @file
* Install, update and uninstall related functions for the module.
*/
/**
* Implements hook_install().
*
* Display a message to the admin about activating this module.
*/
function email_verify_install() {
$t = get_t();
$link = l($t('administrative settings page'), 'admin/config/system/email_verify');
$message = $t('The Email Verify module has been installed and enabled. However, before it can be used, it must be activated and configured on its !adminpage.', array(
'!adminpage' => $link,
));
drupal_set_message($message);
}
/**
* Implements hook_uninstall().
*
* Removes variables created by this module.
*/
function email_verify_uninstall() {
db_query("DELETE FROM {variable} WHERE name LIKE 'email_verify_%'");
}
/**
* Implements hook_disable().
*/
function email_verify_disable() {
$email_verify_active = variable_get('email_verify_active', NULL);
if ($email_verify_active !== NULL) {
// Inactivate this module.
variable_set('email_verify_active', FALSE);
}
}
/**
* Changes the email_verify_on variable to email_verify_active.
*/
function email_verify_update_7100() {
$email_verify_on = variable_get('email_verify_on', NULL);
if ($email_verify_on !== NULL) {
variable_set('email_verify_active', $email_verify_on);
variable_del('email_verify_on');
}
}
Functions
Name![]() |
Description |
---|---|
email_verify_disable | Implements hook_disable(). |
email_verify_install | Implements hook_install(). |
email_verify_uninstall | Implements hook_uninstall(). |
email_verify_update_7100 | Changes the email_verify_on variable to email_verify_active. |