diff options
-rw-r--r-- | THANKS | 1 | ||||
-rw-r--r-- | share/www/script/futon.js | 12 |
2 files changed, 10 insertions, 3 deletions
@@ -46,5 +46,6 @@ suggesting improvements or submitting changes. Some of these people are: * Damjan Georgievski <gdamjan@mail.net.mk> * Jan Kassens <jan@kassens.net> * James Marca <jmarca@translab.its.uci.edu> + * Matt Goodall <matt.goodall@gmail.com> For a list of authors see the `AUTHORS` file. diff --git a/share/www/script/futon.js b/share/www/script/futon.js index 7401b4cc..57a9aceb 100644 --- a/share/www/script/futon.js +++ b/share/www/script/futon.js @@ -69,9 +69,15 @@ if (!validateUsernameAndPassword(data, callback)) return; $.couch.config({ success : function() { - callback(); - doLogin(data.name, data.password, callback); - doSignup(data.name, null, callback, false); + doLogin(data.name, data.password, function(errors) { + if(!$.isEmptyObject(errors)) { + callback(errors); + return; + } + doSignup(data.name, null, function(errors) { + callback(errors); + }, false); + }); } }, "admins", data.name, data.password); } |