From df69978f7fa3b29d9791e14a49c4a809ad138df3 Mon Sep 17 00:00:00 2001 From: Steven Wittens Date: Fri, 29 Jul 2005 07:19:12 +0000 Subject: [PATCH] - #27694: Correct username validation. --- modules/user.module | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/user.module b/modules/user.module index c3e1af9213e..96d40b99bf1 100644 --- a/modules/user.module +++ b/modules/user.module @@ -210,7 +210,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.');