Commit 6123aad5 authored by Steve Gerbino's avatar Steve Gerbino

Issue #1203330 by sw3b: Initial commit implementing Profile2

integration.
parent f8d28f51
This diff is collapsed.
name = Realname registration
description = "For generating usernames based on first name and last name."
description = "For generating usernames based on real names."
core = 7.x
dependencies[] = token
files[] = realname_registration.module
files[] = realname_registration.install
files[] = realname_registration.admin.inc
......
......@@ -4,9 +4,32 @@
* 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('profile2')) {
$message = $t('Enable the core module Profile, or ');
$message .= '<a href="http://drupal.org/project/profile2">Profile2</a> ';
$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'");
}
}
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment