Commit 6dd7baa2 authored by Steve Gerbino's avatar Steve Gerbino

Issue #1220506 by jeanlucnguyen: Added username variations without

spaces. Also fixed typo in the administration settings form (Last name
field set). Added an uninstall hook to clearup variable created by
Realname registration.
parent e3f39684
......@@ -15,12 +15,12 @@ function realname_registration_settings_form() {
$form = array();
if (!module_exists('profile2')) {
variable_set('realname_registration_use_profile2_firstname_field', FALSE);
variable_set('realname_registration_profile2_firstname_field_profile_name', '');
variable_set('realname_registration_use_profile2_middlename_field', FALSE);
variable_set('realname_registration_profile2_middlename_field_profile_name', '');
variable_set('realname_registration_use_profile2_lastname_field', FALSE);
variable_set('realname_registration_profile2_lastname_field_profile_name', '');
variable_del('realname_registration_use_profile2_firstname_field');
variable_del('realname_registration_profile2_firstname_field_profile_name');
variable_del('realname_registration_use_profile2_middlename_field');
variable_del('realname_registration_profile2_middlename_field_profile_name');
variable_del('realname_registration_use_profile2_lastname_field');
variable_del('realname_registration_profile2_lastname_field_profile_name');
}
$field_req = '
......@@ -117,7 +117,7 @@ function realname_registration_settings_form() {
$form['fields']['lastname'] = array(
'#type' => 'fieldset',
'#title' => t('Middle name field'),
'#title' => t('Last name field'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
);
......@@ -176,7 +176,10 @@ function realname_registration_settings_form() {
t('First initial and last name (e.g., JSmith)'),
t('First name, middle name, and last name (e.g., John Jacob Smith)'),
t('First name, middle initial, and last name (e.g., John J Smith)'),
t('First initial, middle initial, and last name (e.g., JJSmith)')
t('First initial, middle initial, and last name (e.g., JJSmith)'),
t('First name and last name without spaces (e.g., JohnSmith)'),
t('First name, middle name, and last name without spaces (e.g., JohnJacobSmith)'),
t('First name, middle initial, and last name without spaces (e.g., JohnJSmith)')
),
'#required' => TRUE,
);
......
......@@ -9,4 +9,23 @@
*/
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_profile2_firstname_field');
variable_del('realname_registration_profile2_firstname_field_profile_name');
variable_del('realname_registration_use_profile2_middlename_field');
variable_del('realname_registration_profile2_middlename_field_profile_name');
variable_del('realname_registration_use_profile2_lastname_field');
variable_del('realname_registration_profile2_lastname_field_profile_name');
variable_del('realname_registration_firstname_field');
variable_del('realname_registration_middlename_field');
variable_del('realname_registration_lastname_field');
variable_del('realname_registration_ucfirst');
variable_del('realname_registration_format');
variable_del('realname_registration_tolower');
variable_del('realname_registration_use_validation');
}
\ 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