mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Merge pull request #131 from javorszky/iss82-2
Registration no longer hangs on duplicate emails
This commit is contained in:
commit
320bb311bc
1 changed files with 1 additions and 1 deletions
|
@ -45,7 +45,7 @@
|
||||||
|
|
||||||
return this.forge({email_address: userData.email_address}).fetch().then(function (user) {
|
return this.forge({email_address: userData.email_address}).fetch().then(function (user) {
|
||||||
if (!!user.attributes.email_address) {
|
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) {
|
return nodefn.call(bcrypt.hash, _user.password, null, null).then(function (hash) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue