diff options
-rw-r--r-- | lib/user.php | 2 | ||||
-rw-r--r-- | settings/js/users.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/user.php b/lib/user.php index 241d9aa8b10..0a5881ec0f8 100644 --- a/lib/user.php +++ b/lib/user.php @@ -120,7 +120,7 @@ class OC_User { return false; } // No empty username - if( !$uid ){ + if(trim($uid) == ''){ return false; } // Check if user already exists diff --git a/settings/js/users.js b/settings/js/users.js index 4fea52e4a1f..79b4e80870a 100644 --- a/settings/js/users.js +++ b/settings/js/users.js @@ -126,7 +126,7 @@ $(document).ready(function(){ $('#newuser').submit(function(event){ event.preventDefault(); var username=$('#newusername').val(); - if(username == '') { + if($.trim(username) == '') { alert('Please provide a username!'); return false; } |