From b0df5560a466d9e2de70b31d7d6ea91480a2e24b Mon Sep 17 00:00:00 2001 From: marcus Date: Mon, 27 Apr 2009 16:36:00 +0000 Subject: Closes #927: Minimum user length no longer hard coded. git-svn-id: https://code.elgg.org/elgg/trunk@3240 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/users.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/engine/lib/users.php b/engine/lib/users.php index 525e66127..f83babc66 100644 --- a/engine/lib/users.php +++ b/engine/lib/users.php @@ -1123,8 +1123,12 @@ */ function validate_username($username) { - // Basic, check length - if (strlen($username)<4) throw new RegistrationException(elgg_echo('registration:usernametooshort')); + // Basic, check length + if (!isset($CONFIG->minusername)) { + $CONFIG->minusername = 4; + } + + if (strlen($CONFIG->minusername)<4) throw new RegistrationException(elgg_echo('registration:usernametooshort')); // Blacklist for bad characters (partially nicked from mediawiki) -- cgit v1.2.3