Esempio n. 1
0
        public void CleanUpExpiredSessions()
        {
            var cutOff          = DateTime.UtcNow.Subtract(new TimeSpan(0, _settingsManager.Current.SessionLength, 0));
            var expiredSessions = _userSessionRepository.GetAndDeleteExpiredSessions(cutOff);

            foreach (var session in expiredSessions)
            {
                _securityLogService.CreateLogEntry(null, session.UserID, String.Empty, session.SessionID.ToString(), SecurityLogType.UserSessionEnd, session.LastTime);
            }
        }