Exemple #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string code   = IdentityHelpers.GetCodeFromRequest(Request);
            string userId = IdentityHelpers.GetUserIdFromRequest(Request);

            if (code != null && userId != null)
            {
                var manager = Context.GetOwinContext().GetUserManager <ApplicationUserManager>();
                var result  = manager.ConfirmEmail(userId, code);
                if (result.Succeeded)
                {
                    successPanel.Visible = true;
                    return;
                }
            }
            successPanel.Visible = false;
            errorPanel.Visible   = true;
        }