Created
February 10, 2012 02:25
-
-
Save mdz/1785708 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/site/app/lib/auth.js b/site/app/lib/auth.js | |
| index 637420b..a4d52b3 100644 | |
| --- a/site/app/lib/auth.js | |
| +++ b/site/app/lib/auth.js | |
| @@ -47,6 +47,10 @@ exports.createAccount = function(newUserAttributes, promise) { | |
| user.name = name; | |
| user.optin = optin; | |
| accounts.findOne({$or:[{email:email}, {'locker.name':lockerName}]}, function(err, doc) { | |
| + if (err) { | |
| + promise.fulfill([err]); | |
| + return promise; | |
| + } | |
| if (!doc) { | |
| accounts.save(user, function(err, doc) { | |
| if (err) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment