summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2008-04-19 17:10:50 +0000
committerDries Buytaert <dries@buytaert.net>2008-04-19 17:10:50 +0000
commit9feab1f2eab981c70d7ccbc423bfed051b21f5df (patch)
tree73b0cf1579d3bf31f7fc97d85246149f7eaf56ee /modules
parent1db338e0e1701a2cda518d23c9c5eafdfb4d922c (diff)
downloadbrdo-9feab1f2eab981c70d7ccbc423bfed051b21f5df.tar.gz
brdo-9feab1f2eab981c70d7ccbc423bfed051b21f5df.tar.bz2
- Patch #228594 by catch and flobruit: some code clean-up.
Diffstat (limited to 'modules')
-rw-r--r--modules/user/user.module16
1 files changed, 8 insertions, 8 deletions
diff --git a/modules/user/user.module b/modules/user/user.module
index 9314ccd32..54543c861 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -371,7 +371,9 @@ function user_validate_name($name) {
}
function user_validate_mail($mail) {
- if (!$mail) return t('You must enter an e-mail address.');
+ if (!$mail) {
+ return t('You must enter an e-mail address.');
+ }
if (!valid_email_address($mail)) {
return t('The e-mail address %mail is not valid.', array('%mail' => $mail));
}
@@ -891,7 +893,7 @@ function user_menu() {
'file' => 'user.pages.inc',
);
- // Admin user pages.
+ // User administration pages.
$items['admin/user'] = array(
'title' => 'User management',
'description' => "Manage your site's users, groups and access to site features.",
@@ -929,7 +931,7 @@ function user_menu() {
'file' => 'user.admin.inc',
);
- // Admin access pages.
+ // Permission administration pages.
$items['admin/user/permissions'] = array(
'title' => 'Permissions',
'description' => 'Determine access to features by selecting permissions for roles.',
@@ -1203,11 +1205,9 @@ function user_login_default_validators() {
* A FAPI validate handler. Sets an error if supplied username has been blocked.
*/
function user_login_name_validate($form, &$form_state) {
- if (isset($form_state['values']['name'])) {
- if (user_is_blocked($form_state['values']['name'])) {
- // blocked in user administration
- form_set_error('name', t('The username %name has not been activated or is blocked.', array('%name' => $form_state['values']['name'])));
- }
+ if (isset($form_state['values']['name']) && user_is_blocked($form_state['values']['name'])) {
+ // Blocked in user administration.
+ form_set_error('name', t('The username %name has not been activated or is blocked.', array('%name' => $form_state['values']['name'])));
}
}