aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-04-27 16:36:00 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-04-27 16:36:00 +0000
commitb0df5560a466d9e2de70b31d7d6ea91480a2e24b (patch)
tree01119f5a44bb9d0675cfa17c5ab44ad0d460ea56
parentc20a845399abb93419e01d959f4884ba26424558 (diff)
downloadelgg-b0df5560a466d9e2de70b31d7d6ea91480a2e24b.tar.gz
elgg-b0df5560a466d9e2de70b31d7d6ea91480a2e24b.tar.bz2
Closes #927: Minimum user length no longer hard coded.
git-svn-id: https://code.elgg.org/elgg/trunk@3240 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/users.php8
1 files 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)