init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue