From 92278086bb38a7b25272e6705c615fd9b8133f36 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 25 Sep 2009 15:14:18 +0000 Subject: - Patch #118345 by sun: code clean-up and removed extra condition that slipped in. --- modules/user/user.module | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'modules/user/user.module') diff --git a/modules/user/user.module b/modules/user/user.module index 76f691007..2de52e237 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -1804,14 +1804,16 @@ function user_edit_form(&$form, &$form_state) { $admin = user_access('administer users'); // Account information: - $form['account'] = array('#type' => 'fieldset', + $form['account'] = array( + '#type' => 'fieldset', '#title' => t('Account information'), '#weight' => -10, ); // Only show name field when: registration page; or user is editing own // account and can change username; or an admin user. if ($register || ($user->uid == $account->uid && user_access('change own username')) || $admin) { - $form['account']['name'] = array('#type' => 'textfield', + $form['account']['name'] = array( + '#type' => 'textfield', '#title' => t('Username'), '#maxlength' => USERNAME_MAX_LENGTH, '#description' => t('Spaces are allowed; punctuation is not allowed except for periods, hyphens, apostrophes, and underscores.'), @@ -1822,7 +1824,8 @@ function user_edit_form(&$form, &$form_state) { $form['account']['name']['#default_value'] = $account->name; } } - $form['account']['mail'] = array('#type' => 'textfield', + $form['account']['mail'] = array( + '#type' => 'textfield', '#title' => t('E-mail address'), '#maxlength' => EMAIL_MAX_LENGTH, '#description' => t('A valid e-mail address. All e-mails from the system will be sent to this address. The e-mail address is not made public and will only be used if you wish to receive a new password or wish to receive certain news or notifications by e-mail.'), @@ -1832,7 +1835,8 @@ function user_edit_form(&$form, &$form_state) { $form['account']['mail']['#default_value'] = $account->mail; } if (!$register) { - $form['account']['pass'] = array('#type' => 'password_confirm', + $form['account']['pass'] = array( + '#type' => 'password_confirm', '#description' => t('To change the current user password, enter the new password in both fields.'), '#size' => 25, ); @@ -1896,7 +1900,7 @@ function user_edit_form(&$form, &$form_state) { } // Picture/avatar: - if (variable_get('user_pictures', 0) && !$register && !$admin) { + if (variable_get('user_pictures', 0) && !$register) { $form['picture'] = array( '#type' => 'fieldset', '#title' => t('Picture'), -- cgit v1.2.3