예제 #1
0
 /// <summary>
 /// Performs the logout.
 /// </summary>
 private void Logout()
 {
     Users.NotifyLogout(currentWiki, SessionFacade.CurrentUsername);
     LoginTools.SetLoginCookie("", "", DateTime.Now.AddYears(-1));
     Log.LogEntry("User " + SessionFacade.CurrentUsername + " logged out", EntryType.General, Log.SystemUsername, currentWiki);
     SessionFacade.Clear();
 }
예제 #2
0
 /// <summary>
 /// Sets up a user session.
 /// </summary>
 /// <param name="wiki">The wiki.</param>
 /// <param name="user">The user (<c>null</c> for anonymous).</param>
 public static void SetupSession(string wiki, UserInfo user)
 {
     if (user != null)
     {
         SessionFacade.SetupSession(wiki, user);
     }
     else
     {
         SessionFacade.Clear();
     }
 }