My application is performing email validation sending an email to the user. When the user click on the link, the following action is called:
[AllowAnonymous]
public ActionResult RegisterConfirmation(string Id) //Id=ConfirmationToken
{
if (WebSecurity.ConfirmAccount(Id))
{
//get userId and perfom some operations related to it
return RedirectToAction("ConfirmationSuccess");
}
return RedirectToAction("ConfirmationFailure");
}
My question is:
How can I get the userId using the ConfirmationToken?
I'm using SimpleMembershipProvider
and I have acces to my database context.