fix: Update email action should hit API

This commit is contained in:
Mrugesh Mohapatra
2017-12-05 11:55:41 +05:30
parent 35f0b4f0d7
commit 885d5916c0
6 changed files with 15 additions and 9 deletions

View File

@ -574,6 +574,7 @@ module.exports = function(User) {
) {
const ownEmail = newEmail === this.email;
if (!isEmail('' + newEmail)) {
debug('invalid email:', newEmail );
return Observable.throw(createEmailError());
}
// email is already associated and verified with this account