Merge pull request #131 from javorszky/iss82-2

Registration no longer hangs on duplicate emails
This commit is contained in:
Hannah Wolfe 2013-06-11 04:41:22 -07:00
commit 320bb311bc

View File

@ -45,7 +45,7 @@
return this.forge({email_address: userData.email_address}).fetch().then(function (user) {
if (!!user.attributes.email_address) {
when.reject(new Error('A user with that email address already exists.'));
return when.reject(new Error('A user with that email address already exists.'));
}
return nodefn.call(bcrypt.hash, _user.password, null, null).then(function (hash) {