Beispiel #1
0
 protected void LogoutClicked(object o, EventArgs e)
 {
     if (SecurityContextManager.Current != null)
     {
         SecurityServices.ClearUserCouchbaseCache((Person)SecurityContextManager.Current.CurrentUser);
         SecurityContextManager.Current.LogEvent(SecurityContextManager.Current.CurrentUser.ID, DateTime.Now, (int)ApplicationLogTypes.USER_LOGOUT, SecurityContextManager.Current.CurrentUser.AccountID, "User clicked logout button", "", "");
     }
     SecurityContextManager.Current = null;
     HttpContext.Current.Session.Clear();
     HttpContext.Current.Response.Cookies.Clear();
     FormsAuthentication.SignOut();
     HttpContext.Current.Response.Redirect(ResourceStrings.Page_Login);
 }