]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix whitespace username
authorGeorg Ehrke <ownclouddev@georgswebsite.de>
Mon, 2 Jan 2012 10:49:53 +0000 (11:49 +0100)
committerGeorg Ehrke <ownclouddev@georgswebsite.de>
Mon, 2 Jan 2012 10:49:53 +0000 (11:49 +0100)
lib/user.php
settings/js/users.js

index 241d9aa8b1042c158b1829b307ff92e95a88768a..0a5881ec0f82c63d7ae73deca5d87e6aa6868674 100644 (file)
@@ -120,7 +120,7 @@ class OC_User {
                        return false;
                }
                // No empty username
-               if( !$uid ){
+               if(trim($uid) == ''){
                        return false;
                }
                // Check if user already exists
index 4fea52e4a1f38de0f552f774c9138b3d1ccb640c..79b4e80870a7065124825501dbccc8b84e4fba9f 100644 (file)
@@ -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;
                }