aboutsummaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-01-15 17:19:45 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-01-15 17:19:45 +0000
commit004add5e820c96f2384d1c793041a224f4ae7044 (patch)
treef1d24601833b12c3fa9f8b5a4cf07fb017bb7703 /services
parent8e9d354af15afcb26c1a56b279f9c03f2fbd75ca (diff)
downloadsemanticscuttle-004add5e820c96f2384d1c793041a224f4ae7044.tar.gz
semanticscuttle-004add5e820c96f2384d1c793041a224f4ae7044.tar.bz2
Interface Fix: too short username are forbidden during registration
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@236 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'services')
-rw-r--r--services/userservice.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/services/userservice.php b/services/userservice.php
index ad79d34..fa0d5c9 100644
--- a/services/userservice.php
+++ b/services/userservice.php
@@ -445,7 +445,9 @@ class UserService {
}
function isValidUsername($username) {
- if (strlen($username) > 24) {
+ if (strlen($username) < 4) {
+ return false;
+ }elseif (strlen($username) > 24) {
// too long usernames are cut by database and may cause bugs when compared
return false;
} elseif (preg_match('/(\W)/', $username) > 0) {