diff options
Diffstat (limited to 'engine/lib')
-rw-r--r-- | engine/lib/users.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/engine/lib/users.php b/engine/lib/users.php index f1d42e25e..79a054938 100644 --- a/engine/lib/users.php +++ b/engine/lib/users.php @@ -810,6 +810,12 @@ function validate_username($username) { $msg = elgg_echo('registration:usernametooshort', array($CONFIG->minusername)); throw new RegistrationException($msg); } + + // username in the database has a limit of 128 characters + if (strlen($username) > 128) { + $msg = elgg_echo('registration:usernametoolong', array(128)); + throw new RegistrationException($msg); + } // Blacklist for bad characters (partially nicked from mediawiki) $blacklist = '/[' . |