summaryrefslogtreecommitdiff
path: root/modules/user/user.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/user/user.module')
-rw-r--r--modules/user/user.module2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/user/user.module b/modules/user/user.module
index ff4666cef..192b497e7 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -209,7 +209,7 @@ function user_save($account, $array = array(), $category = 'account') {
* Verify the syntax of the given name.
*/
function user_validate_name($name) {
- if (!$name) return t('You must enter a username.');
+ if (!strlen($name)) return t('You must enter a username.');
if (substr($name, 0, 1) == ' ') return t('The username cannot begin with a space.');
if (substr($name, -1) == ' ') return t('The username cannot end with a space.');
if (ereg(' ', $name)) return t('The username cannot contain multiple spaces in a row.');