Get user from enrollment token


#1

Does anyone know how I can get the user form the enrollment token?


Error while trying to reply to a help request on forums.meteor.com
#2

Are you trying to handle the Accounts-Password Send Enrollment Email scenario? If so, the callback function to call after the user has clicked on the link in the email is set using the register function Accounts.onEnrollmentLink.

If you use that process flow then the next thing to do, according to the documentation, is to pass the token to the Accounts.resetPassword function and call the done method to resume the normal user login process. The token and the done method are passed as arguments to the Accounts.onEnrollmentLink register function.

Once the normal process is resumed and the user is logged in you can get the user’s information as usual, i.e. Meteor.user().


#3

That’s an interesting method!