diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-05-13 20:53:45 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-05-13 20:53:56 +0200 |
commit | 1a2ab2ef6881ce4f9e53a84f53ee5e578427434e (patch) | |
tree | 1897bbfb9ba03cc781338f3dedfdc37ae6a51255 /settings | |
parent | 77e2387d94b7f6c9574cbed8a5d242628391906c (diff) | |
download | nextcloud-server-1a2ab2ef6881ce4f9e53a84f53ee5e578427434e.tar.gz nextcloud-server-1a2ab2ef6881ce4f9e53a84f53ee5e578427434e.zip |
prevent user creation with empty password
Diffstat (limited to 'settings')
-rw-r--r-- | settings/js/users.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/settings/js/users.js b/settings/js/users.js index 971da7abe98..7c3c3d37b18 100644 --- a/settings/js/users.js +++ b/settings/js/users.js @@ -157,6 +157,7 @@ $(document).ready(function(){ $('#newuser').submit(function(event){ event.preventDefault(); var username=$('#newusername').val(); + var password=$('#newuserpassword').val(); if($('#content table tbody tr').filterAttr('data-uid',username).length>0){ OC.dialogs.alert('The username is already being used', 'Error creating user'); return; @@ -165,7 +166,10 @@ $(document).ready(function(){ OC.dialogs.alert('A valid username must be provided', 'Error creating user'); return false; } - var password=$('#newuserpassword').val(); + if($.trim(password) == '') { + OC.dialogs.alert('A valid password must be provided', 'Error creating user'); + return false; + } var groups=$('#newusergroups').prev().children('div').data('settings').checked; $('#newuser').get(0).reset(); $.post( |