function realname_registration_enable in Realname registration 6.2
Same name and namespace in other branches
- 7.2 realname_registration.install \realname_registration_enable()
File
- ./
realname_registration.module, line 14 - For using real names during registration.
Code
function realname_registration_enable() {
$p = module_exists('profile');
$c = module_exists('content_profile_registration');
// Check if atleast one of the dependent modules are enabled.
if ($p || $c) {
$success = t('Realname registration has been successfully enabled.');
$success .= ' ';
$success .= t('Please proceed to the <a href="../user/realname_registration">module configuration page</a>.');
drupal_set_message($success, 'status');
}
else {
$error = t('Realname registration requires that you enable the Profile module or Content profile registration.') . ' ';
$error .= t('Please enable one of the depedent modules before re-enabling Realname registration');
drupal_set_message($error, 'error');
module_disable(array(
0 => 'realname_registration',
));
}
}