using System.Web; using Kreta.Framework; using Kreta.Web.Classes; using Kreta.Web.Security; using Kreta.Web.Utils; namespace Kreta.Web.Controllers.Logic { public static class MasterLayoutLogic { public static void LogOut() { if (HttpContext.Current == null) { return; } if (ClaimData.IsAuthenticated) { string sessionId = ClaimData.SessionId; if (SDAServer.Instance != null) { SDAServer.Instance.SessionManager.DeleteSession(sessionId); } ProfileUtils.RemoveUserProfileImage(sessionId); ProfileUtils.RemoveUserProfileDocument(sessionId); SessionHandler.DropSession(sessionId); using (var loginManager = new LoginManager()) { loginManager.LogOut(); } } } } }