aboutsummaryrefslogtreecommitdiff
path: root/register.php
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-11-14 11:36:23 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-11-14 11:36:23 +0000
commite530ffa24f8ae9657f23809f265f9f6628325ff3 (patch)
tree94cd2541830d9faf1f2c99ad6d987f2b6257742f /register.php
parentfc5091f407e785799f9cf9ef684f47a2ae298358 (diff)
downloadsemanticscuttle-e530ffa24f8ae9657f23809f265f9f6628325ff3.tar.gz
semanticscuttle-e530ffa24f8ae9657f23809f265f9f6628325ff3.tar.bz2
Bug fix: test username's length (max 25) when registering (preventing problem with database
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@155 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'register.php')
-rw-r--r--register.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/register.php b/register.php
index e60a686..b70d724 100644
--- a/register.php
+++ b/register.php
@@ -39,6 +39,10 @@ if (isset($_POST['submitted'])) {
// Check if username already exists
} elseif ($userservice->getUserByUsername($posteduser)) {
$tplVars['error'] = T_('This username already exists, please make another choice.');
+
+ // Check if username is valid (length, authorized characters)
+ } elseif (!$userservice->isValidUsername($posteduser)) {
+ $tplVars['error'] = T_('This username is not valid (too long, forbidden characters...), please make another choice.');
// Check if e-mail address is valid
} elseif (!$userservice->isValidEmail($_POST['email'])) {