Skip to content

Commit bd8c61f

Browse files
committed
Keeping old email before confirmed new. Controlling same emailNew.
1 parent d3fa1f8 commit bd8c61f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/RestWrite.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ RestWrite.prototype._validateEmail = function() {
587587
return this.config.database
588588
.find(
589589
this.className,
590-
{ email: this.data.email, objectId: { $ne: this.objectId() } },
590+
{ $or: [{ email: this.data.email }, { emailNew: this.data.email }], objectId: { $ne: this.objectId() } },
591591
{ limit: 1 }
592592
)
593593
.then(results => {

0 commit comments

Comments
 (0)