Unset _perishable_token after reset password, instead of setting it to null. #951
This commit is contained in:
@@ -173,7 +173,7 @@ export class UserController extends AdaptableController {
|
|||||||
return this.config.database.adaptiveCollection('_User').then(function (collection) {
|
return this.config.database.adaptiveCollection('_User').then(function (collection) {
|
||||||
// Need direct database access because verification token is not a parse field
|
// Need direct database access because verification token is not a parse field
|
||||||
return collection.findOneAndUpdate({ username: username },// query
|
return collection.findOneAndUpdate({ username: username },// query
|
||||||
{ $set: { _perishable_token: null } } // update
|
{ $unset: { _perishable_token: null } } // update
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user