Example #1
0
 public void RemoveLogin(string loginProvider, string providerKey)
 {
     UserManager manager = new UserManager();
     var result = manager.RemoveLogin(User.Identity.GetUserId(), new UserLoginInfo(loginProvider, providerKey));
     var msg = result.Succeeded
         ? "?m=RemoveLoginSuccess"
         : String.Empty;
     Response.Redirect("~/Account/Manage" + msg);
 }
Example #2
0
 public void RemoveLogin(string loginProvider, string providerKey)
 {
     UserManager manager = new UserManager();
     var result = manager.RemoveLogin(User.Identity.GetUserId(), new UserLoginInfo(loginProvider, providerKey));
     string msg = String.Empty;
     if (result.Succeeded)
     {
         var user = manager.FindById(User.Identity.GetUserId());
         IdentityHelper.SignIn(manager, user, isPersistent: false);
         msg = "?m=RemoveLoginSuccess";
     }
     Response.Redirect("~/Account/Manage" + msg);
 }