diff options
Diffstat (limited to 'modules/user/user.module')
-rw-r--r-- | modules/user/user.module | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/user/user.module b/modules/user/user.module index c57f6ea54..3a23cd772 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -945,7 +945,7 @@ function user_user_validate(&$edit, &$account, $category = NULL) { if ($error = user_validate_name($edit['name'])) { form_set_error('name', $error); } - elseif ((bool) db_query_range("SELECT 1 FROM {users} WHERE uid != :uid AND LOWER(name) = LOWER(:name)", array(':uid' => $uid, ':name' => $edit['name']), 0, 1)->fetchField()) { + elseif ((bool) db_query_range("SELECT 1 FROM {users} WHERE uid <> :uid AND LOWER(name) = LOWER(:name)", array(':uid' => $uid, ':name' => $edit['name']), 0, 1)->fetchField()) { form_set_error('name', t('The name %name is already taken.', array('%name' => $edit['name']))); } } @@ -954,7 +954,7 @@ function user_user_validate(&$edit, &$account, $category = NULL) { if ($error = user_validate_mail($edit['mail'])) { form_set_error('mail', $error); } - elseif ((bool) db_query_range("SELECT 1 FROM {users} WHERE uid != :uid AND LOWER(mail) = LOWER(:mail)", array(':uid' => $uid, ':mail' => $edit['mail']), 0, 1)->fetchField()) { + elseif ((bool) db_query_range("SELECT 1 FROM {users} WHERE uid <> :uid AND LOWER(mail) = LOWER(:mail)", array(':uid' => $uid, ':mail' => $edit['mail']), 0, 1)->fetchField()) { // Format error message dependent on whether the user is logged in or not. if ($GLOBALS['user']->uid) { form_set_error('mail', t('The e-mail address %email is already taken.', array('%email' => $edit['mail']))); @@ -1117,7 +1117,7 @@ function user_block_view($delta = '') { case 'new': if (user_access('access content')) { // Retrieve a list of new users who have subsequently accessed the site successfully. - $items = db_query_range('SELECT uid, name FROM {users} WHERE status != 0 AND access != 0 ORDER BY created DESC', array(), 0, variable_get('user_block_whois_new_count', 5))->fetchAll(); + $items = db_query_range('SELECT uid, name FROM {users} WHERE status <> 0 AND access <> 0 ORDER BY created DESC', array(), 0, variable_get('user_block_whois_new_count', 5))->fetchAll(); $output = theme('user_list', $items); $block['subject'] = t('Who\'s new'); |