/// ----------------------------------------------------------------------------- /// <summary> /// Tracks an Authenticated User /// </summary> /// <param name="context">An HttpContext Object</param> /// ----------------------------------------------------------------------------- private void TrackAuthenticatedUser(HttpContext context) { //Retrieve Portal Settings var portalSettings = (PortalSettings)context.Items["PortalSettings"]; if (portalSettings == null) { return; } //Get the logged in User ID UserInfo objUserInfo = UserController.Instance.GetCurrentUserInfo(); //Get user list Hashtable userList = GetUserList(); var user = new OnlineUserInfo(); if (objUserInfo.UserID > 0) { user.UserID = objUserInfo.UserID; } user.PortalID = portalSettings.PortalId; user.TabID = portalSettings.ActiveTab.TabID; user.LastActiveDate = DateTime.Now; if ((userList[objUserInfo.UserID.ToString()] == null)) { user.CreationDate = user.LastActiveDate; } userList[objUserInfo.UserID.ToString()] = user; SetUserList(userList); }
/// ----------------------------------------------------------------------------- /// <summary> /// Tracks an Authenticated User /// </summary> /// <param name="context">An HttpContext Object</param> /// <history> /// [cnurse] 03/14/2006 documented /// </history> /// ----------------------------------------------------------------------------- private void TrackAuthenticatedUser(HttpContext context) { //Retrieve Portal Settings var portalSettings = (PortalSettings) context.Items["PortalSettings"]; if (portalSettings == null) { return; } //Get the logged in User ID UserInfo objUserInfo = UserController.Instance.GetCurrentUserInfo(); //Get user list Hashtable userList = GetUserList(); var user = new OnlineUserInfo(); if (objUserInfo.UserID > 0) { user.UserID = objUserInfo.UserID; } user.PortalID = portalSettings.PortalId; user.TabID = portalSettings.ActiveTab.TabID; user.LastActiveDate = DateTime.Now; if ((userList[objUserInfo.UserID.ToString()] == null)) { user.CreationDate = user.LastActiveDate; } userList[objUserInfo.UserID.ToString()] = user; SetUserList(userList); }