Unset _perishable_token after reset password, instead of setting it to null. #951

This commit is contained in:
Carmen
2016-03-22 22:20:36 +08:00
parent b3c5e836d5
commit 120c6feb61

View File

@@ -173,7 +173,7 @@ export class UserController extends AdaptableController {
return this.config.database.adaptiveCollection('_User').then(function (collection) {
// Need direct database access because verification token is not a parse field
return collection.findOneAndUpdate({ username: username },// query
{ $set: { _perishable_token: null } } // update
{ $unset: { _perishable_token: null } } // update
);
});
});