This commit is contained in:
skidoodle 2024-03-13 00:33:46 +01:00
commit e124a47765
19374 changed files with 9806149 additions and 0 deletions

View file

@ -0,0 +1,38 @@
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();
}
}
}
}
}