Commit f8d28f51 authored by Steve Gerbino's avatar Steve Gerbino

Fix code to adhere to Drupal coding standards, also modify the display

of the regular expression on the admin settings page.
parent 2cd23b5b
......@@ -83,7 +83,7 @@ function realname_registration_settings_form() {
'#type' => 'checkbox',
'#title' => t('Use Realname registration validation'),
'#default_value' => variable_get('realname_registration_use_validation', 1),
'#description' => t('Use regex to validate real names (/^[A-ZÀ-ÖØ-öø-ÿ]+$/i)'),
'#description' => t('Use regex to validate real names (/^[A-ZÀ-ÖØ-öø-ÿ -]+$/i)'),
);
$form['#validate'][] = 'realname_registration_settings_validate';
......
......@@ -105,7 +105,7 @@ function realname_registration_user_presave(&$edit, $account, $category) {
}
if ((variable_get('realname_registration_format')) == 3) {
$username = $edit[$firstname_field]['und'][0]['value'];
if(!empty($edit[$middlename_field]['und'][0]['value'])) {
if (!empty($edit[$middlename_field]['und'][0]['value'])) {
$username .= ' ';
$username .= drupal_substr($edit[$middlename_field]['und'][0]['value'], 0, 1);
}
......
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