summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--THANKS1
-rw-r--r--share/www/script/futon.js12
2 files changed, 10 insertions, 3 deletions
diff --git a/THANKS b/THANKS
index ecf9724d..a57a0f20 100644
--- a/THANKS
+++ b/THANKS
@@ -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);
}