Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addition of [Obsolete] Attribute to Users Online #2797

Merged
merged 2 commits into from May 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions DNN Platform/HttpModules/Users Online/UsersOnlineModule.cs
Expand Up @@ -29,8 +29,10 @@

namespace DotNetNuke.HttpModules.UsersOnline
{
[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
public class UsersOnlineModule : IHttpModule
{
[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
public string ModuleName
{
get
Expand All @@ -52,6 +54,7 @@ public void Dispose()

#endregion

[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
public void OnAuthorizeRequest(object s, EventArgs e)
{
//First check if we are upgrading/installing
Expand Down
4 changes: 4 additions & 0 deletions DNN Platform/Library/Data/DataProvider.cs
Expand Up @@ -2480,21 +2480,25 @@ public virtual IDataReader GetUserRolesByUsername(int portalID, string username,

#region Users Online Methods

[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
public virtual void DeleteUsersOnline(int timeWindow)
{
ExecuteNonQuery("DeleteUsersOnline", timeWindow);
}

[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
public virtual IDataReader GetOnlineUser(int userId)
{
return ExecuteReader("GetOnlineUser", userId);
}

[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
public virtual IDataReader GetOnlineUsers(int portalId)
{
return ExecuteReader("GetOnlineUsers", portalId);
}

[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
public virtual void UpdateUsersOnline(Hashtable userList)
{
if ((userList.Count == 0))
Expand Down
4 changes: 3 additions & 1 deletion DNN Platform/Library/Entities/Host/Host.cs
Expand Up @@ -579,7 +579,8 @@ public static bool EnableUrlLanguage
/// <remarks>
/// Defaults to False
/// </remarks>
/// -----------------------------------------------------------------------------
/// -----------------------------------------------------------------------------
[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
public static bool EnableUsersOnline
{
get
Expand Down Expand Up @@ -1492,6 +1493,7 @@ public static int UserQuota
/// Defaults to 15
/// </remarks>
/// -----------------------------------------------------------------------------
[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
public static int UsersOnlineTimeWindow
{
get
Expand Down
Expand Up @@ -105,6 +105,7 @@ internal void ConfirmApproved()
/// Gets and sets whether the User Is Online
/// </summary>
/// -----------------------------------------------------------------------------
[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
public bool IsOnLine { get; set; }

/// -----------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions DNN Platform/Library/Entities/Users/UserController.cs
Expand Up @@ -1203,6 +1203,7 @@ public static ArrayList GetDeletedUsers(int portalId)
/// <param name="portalId">The Id of the Portal</param>
/// <returns>An ArrayList of UserInfo objects</returns>
/// -----------------------------------------------------------------------------
[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
public static ArrayList GetOnlineUsers(int portalId)
{
return MembershipProvider.Instance().GetOnlineUsers(GetEffectivePortalId(portalId));
Expand Down
Expand Up @@ -29,7 +29,6 @@ namespace DotNetNuke.Entities.Users
/// -----------------------------------------------------------------------------
/// Project: DotNetNuke
/// Namespace: DotNetNuke.Entities.Users
/// Class: PurgeUsersOnline
/// -----------------------------------------------------------------------------
/// <summary>
/// The AnonymousUserInfo class provides an Entity for an anonymous user
mitchelsellers marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -38,6 +37,7 @@ namespace DotNetNuke.Entities.Users
/// </remarks>
/// -----------------------------------------------------------------------------
[Serializable]
[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
public class AnonymousUserInfo : BaseUserInfo
{
private string _UserID;
Expand All @@ -47,6 +47,7 @@ public class AnonymousUserInfo : BaseUserInfo
/// Gets and sets the User Id for this online user
/// </summary>
/// -----------------------------------------------------------------------------
[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
public string UserID
{
get
Expand Down
Expand Up @@ -38,6 +38,7 @@ namespace DotNetNuke.Entities.Users
/// </remarks>
/// -----------------------------------------------------------------------------
[Serializable]
[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
public abstract class BaseUserInfo
{
private DateTime _CreationDate;
Expand All @@ -50,6 +51,7 @@ public abstract class BaseUserInfo
/// Gets and sets the PortalId for this online user
/// </summary>
/// -----------------------------------------------------------------------------
[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
public int PortalID
{
get
Expand All @@ -67,6 +69,7 @@ public int PortalID
/// Gets and sets the TabId for this online user
/// </summary>
/// -----------------------------------------------------------------------------
[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
public int TabID
{
get
Expand All @@ -84,6 +87,7 @@ public int TabID
/// Gets and sets the CreationDate for this online user
/// </summary>
/// -----------------------------------------------------------------------------
[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
public DateTime CreationDate
{
get
Expand All @@ -101,6 +105,7 @@ public DateTime CreationDate
/// Gets and sets the LastActiveDate for this online user
/// </summary>
/// -----------------------------------------------------------------------------
[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
public DateTime LastActiveDate
{
get
Expand Down
Expand Up @@ -38,6 +38,7 @@ namespace DotNetNuke.Entities.Users
/// </remarks>
/// -----------------------------------------------------------------------------
[Serializable]
[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
public class OnlineUserInfo : BaseUserInfo
{
private int _UserID;
Expand All @@ -47,6 +48,7 @@ public class OnlineUserInfo : BaseUserInfo
/// Gets and sets the User Id for this online user
/// </summary>
/// -----------------------------------------------------------------------------
[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
public int UserID
{
get
Expand Down
Expand Up @@ -41,6 +41,7 @@ namespace DotNetNuke.Entities.Users
/// <remarks>
/// </remarks>
/// -----------------------------------------------------------------------------
[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
public class PurgeUsersOnline : SchedulerClient
{
/// -----------------------------------------------------------------------------
Expand All @@ -51,6 +52,7 @@ public class PurgeUsersOnline : SchedulerClient
/// </remarks>
/// <param name="objScheduleHistoryItem">A SchedulerHistiryItem</param>
/// -----------------------------------------------------------------------------
[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
public PurgeUsersOnline(ScheduleHistoryItem objScheduleHistoryItem)
{
ScheduleHistoryItem = objScheduleHistoryItem;
Expand All @@ -61,6 +63,7 @@ public PurgeUsersOnline(ScheduleHistoryItem objScheduleHistoryItem)
/// UpdateUsersOnline updates the Users Online information
/// </summary>
/// -----------------------------------------------------------------------------
[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
private void UpdateUsersOnline()
{
var objUserOnlineController = new UserOnlineController();
Expand All @@ -81,6 +84,7 @@ private void UpdateUsersOnline()
/// DoWork does th4 Scheduler work
/// </summary>
/// -----------------------------------------------------------------------------
[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
public override void DoWork()
{
try
Expand Down
Expand Up @@ -44,6 +44,8 @@ namespace DotNetNuke.Entities.Users
/// <remarks>
/// </remarks>
/// -----------------------------------------------------------------------------

[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
public class UserOnlineController
{
private static readonly ILog Logger = LoggerSource.Instance.GetLogger(typeof (UserOnlineController));
Expand All @@ -56,6 +58,7 @@ public class UserOnlineController
/// Clears the cached Users Online Information
/// </summary>
/// -----------------------------------------------------------------------------
[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
public void ClearUserList()
{
string key = "OnlineUserList";
Expand All @@ -67,6 +70,7 @@ public void ClearUserList()
/// Gets the Online time window
/// </summary>
/// -----------------------------------------------------------------------------
[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
public int GetOnlineTimeWindow()
{
return Host.Host.UsersOnlineTimeWindow;
Expand All @@ -77,6 +81,7 @@ public int GetOnlineTimeWindow()
/// Gets the cached Users Online Information
/// </summary>
/// -----------------------------------------------------------------------------
[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
public Hashtable GetUserList()
{
var userList = (Hashtable)DataCache.GetCache(CacheKey);
Expand All @@ -100,6 +105,7 @@ public Hashtable GetUserList()
/// Gets whether the Users Online functionality is enabled
/// </summary>
/// -----------------------------------------------------------------------------
[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
public bool IsEnabled()
{
return Host.Host.EnableUsersOnline;
Expand All @@ -110,6 +116,7 @@ public bool IsEnabled()
/// Determines whether a User is online
/// </summary>
/// -----------------------------------------------------------------------------
[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
public bool IsUserOnline(UserInfo user)
{
bool isOnline = false;
Expand All @@ -125,6 +132,7 @@ public bool IsUserOnline(UserInfo user)
/// Sets the cached Users Online Information
/// </summary>
/// -----------------------------------------------------------------------------
[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
public void SetUserList(Hashtable userList)
{
DataCache.SetCache(CacheKey, userList);
Expand All @@ -136,6 +144,7 @@ public void SetUserList(Hashtable userList)
/// </summary>
/// <param name="context">An HttpContext Object</param>
/// -----------------------------------------------------------------------------
[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
private void TrackAnonymousUser(HttpContext context)
{
string cookieName = "DotNetNukeAnonymous";
Expand Down Expand Up @@ -223,6 +232,7 @@ private void TrackAnonymousUser(HttpContext context)
/// </summary>
/// <param name="context">An HttpContext Object</param>
/// -----------------------------------------------------------------------------
[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
private void TrackAuthenticatedUser(HttpContext context)
{
//Retrieve Portal Settings
Expand Down Expand Up @@ -259,6 +269,7 @@ private void TrackAuthenticatedUser(HttpContext context)
/// Tracks an online User
/// </summary>
/// -----------------------------------------------------------------------------
[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
public void TrackUsers()
{
HttpContext context = HttpContext.Current;
Expand Down Expand Up @@ -287,6 +298,7 @@ public void TrackUsers()
/// Update the Users Online information
/// </summary>
/// -----------------------------------------------------------------------------
[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
public void UpdateUsersOnline()
{
//Get a Current User List
Expand Down
Expand Up @@ -1026,6 +1026,7 @@ public override bool DeleteUser(UserInfo user)
/// </remarks>
/// <param name="timeWindow">Time Window in Minutes</param>
/// -----------------------------------------------------------------------------
[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
public override void DeleteUsersOnline(int timeWindow)
{
_dataProvider.DeleteUsersOnline(timeWindow);
Expand Down Expand Up @@ -1066,6 +1067,7 @@ public override ArrayList GetDeletedUsers(int portalId)
/// <param name="portalId">The Id of the Portal</param>
/// <returns>An ArrayList of UserInfo objects</returns>
/// -----------------------------------------------------------------------------
[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
public override ArrayList GetOnlineUsers(int portalId)
{
int totalRecords = 0;
Expand Down Expand Up @@ -1533,6 +1535,7 @@ public override ArrayList GetUsers(int portalId, int pageIndex, int pageSize, re
/// <param name="user">The user.</param>
/// <returns>A Boolean indicating whether the user is online.</returns>
/// -----------------------------------------------------------------------------
[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
public override bool IsUserOnline(UserInfo user)
{
bool isOnline = false;
Expand Down Expand Up @@ -1798,6 +1801,7 @@ public override void UpdateUser(UserInfo user)
/// </summary>
/// <param name="userList">List of users to update</param>
/// -----------------------------------------------------------------------------
[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
public override void UpdateUsersOnline(Hashtable userList)
{
_dataProvider.UpdateUsersOnline(userList);
Expand Down
Expand Up @@ -83,9 +83,14 @@ public static MembershipProvider Instance()
public abstract UserInfo UserLogin(int portalId, string username, string password, string authType, string verificationCode, ref UserLoginStatus loginStatus);

// Users Online

[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
public abstract void DeleteUsersOnline(int TimeWindow);
[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
public abstract ArrayList GetOnlineUsers(int PortalId);
[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
public abstract bool IsUserOnline(UserInfo user);
[Obsolete("Support for users online was removed in 8.x, other solutions exist outside of the DNN Platform. Scheduled removal in v11.0.0.")]
public abstract void UpdateUsersOnline(Hashtable UserList);

// Legacy
Expand Down