realname_registration.install in Realname registration 6.2
Same filename and directory in other branches
Install, update and uninstall functions for the realname_registration module.
File
realname_registration.installView source
<?php
/**
* @file
* Install, update and uninstall functions for the realname_registration module.
*/
/**
* Implementation of hook_requirements().
*/
function realname_registration_requirements($phase) {
$requirements = array();
$t = get_t();
if ($phase == 'runtime') {
if (!module_exists('profile') && !module_exists('content_profile_registration')) {
$message = $t('Enable the core module Profile, or ');
$message .= '<a href="http://drupal.org/project/content_profile">Content profile</a> & Content profile registration ';
$message .= $t('to utilize Realname registration.');
$requirements['realname_registration'] = array(
'title' => $t('Realname registration'),
'value' => $message,
'severity' => REQUIREMENT_ERROR,
);
}
}
return $requirements;
}
/**
* Implementation of hook_install().
*/
function realname_registration_install() {
db_query("UPDATE {system} SET weight = 10 WHERE name = 'realname_registration'");
}
/**
* Implementation of hook_uninstall().
*/
function realname_registration_uninstall() {
variable_del('realname_registration_use_content_profile_firstname_field');
variable_del('realname_registration_content_profile_firstname_field_node');
variable_del('realname_registration_use_content_profile_middlename_field');
variable_del('realname_registration_content_profile_middlename_field_node');
variable_del('realname_registration_use_content_profile_lastname_field');
variable_del('realname_registration_content_profile_lastname_field_node');
variable_del('realname_registration_firstname_field');
variable_del('realname_registration_firstname_field_category');
variable_del('realname_registration_middlename_field');
variable_del('realname_registration_middlename_field_category');
variable_del('realname_registration_lastname_field');
variable_del('realname_registration_lastname_field_category');
variable_del('realname_registration_ucfirst');
variable_del('realname_registration_format');
variable_del('realname_registration_tolower');
variable_del('realname_registration_use_validation');
}
Functions
Name![]() |
Description |
---|---|
realname_registration_install | Implementation of hook_install(). |
realname_registration_requirements | Implementation of hook_requirements(). |
realname_registration_uninstall | Implementation of hook_uninstall(). |