You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I delete a user, the document remains in the database, but is not returned from Meteor.users.find() – great! The problem arises when the user tries to create a new account with the same e-mail. Meteor says that a user already exists with that e-mail.
Anything I/we can do about this? Thanks.
The text was updated successfully, but these errors were encountered:
dalgard
changed the title
softRemovable not applied when creating new user
softRemovable not in place when creating new user
Jan 25, 2015
I've solved this by redefining the softRemovable behaviour. It's only a small change. In the new version, when applying the behaviour, a modifier object can be passed as an argument.
The new modifier (defaulted to an empty object) is then extended (using _.default) with the base modifier used inside the .before.update hook, which would normally just $set removed and removedAt. The new modifier is used in place of the base modifier in the update operation.
In regard to the Meteor.users collection, I pass the object below as the new modifier – this way, when creating new users in the future, the duplicate check comes out negative.
Applying behaviours to the
Meteor.users
collection is working fine like this:When I delete a user, the document remains in the database, but is not returned from
Meteor.users.find()
– great! The problem arises when the user tries to create a new account with the same e-mail. Meteor says that a user already exists with that e-mail.Anything I/we can do about this? Thanks.
The text was updated successfully, but these errors were encountered: