Fix whitespace username
This commit is contained in:
parent
4374d55e5e
commit
534b6f3a09
|
@ -120,7 +120,7 @@ class OC_User {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// No empty username
|
// No empty username
|
||||||
if( !$uid ){
|
if(trim($uid) == ''){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Check if user already exists
|
// Check if user already exists
|
||||||
|
|
|
@ -126,7 +126,7 @@ $(document).ready(function(){
|
||||||
$('#newuser').submit(function(event){
|
$('#newuser').submit(function(event){
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
var username=$('#newusername').val();
|
var username=$('#newusername').val();
|
||||||
if(username == '') {
|
if($.trim(username) == '') {
|
||||||
alert('Please provide a username!');
|
alert('Please provide a username!');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue