init
This commit is contained in:
38
KretaWeb/Controllers/Logic/MasterLayoutLogic.cs
Normal file
38
KretaWeb/Controllers/Logic/MasterLayoutLogic.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user