+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Users online module

Users online module

3 posts, 0 answered
  1. rent
    rent avatar
    104 posts
    Registered:
    05 May 2008
    18 Aug 2010
    Link to this post
    Hello ALL!!!
    Is there users online module? Or how to make such as module? Thanks
  2. rent
    rent avatar
    104 posts
    Registered:
    05 May 2008
    18 Aug 2010
    Link to this post
    Anyone?
  3. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    18 Aug 2010
    Link to this post
    Hello rent,

    There is no such control. However you can develop one of your own. Something similar to this one here. Bellow are a couple of statements you can use to get a list of the current users online - either by checking the IsOnline property or checking LasActivityDate. You can later on pass this list to a GridView control for example:
    UserManager uManager = new UserManager();
    int totalRows;
    //get an IList of online users by last activity
    IList users = uManager.GetAllUsers(0, 20, "UserName ASC", out totalRows).Cast<MembershipUser>().AsQueryable<MembershipUser>().Where(u => DateTime.Now.ToUniversalTime().Subtract(u.LastLoginDate).TotalMinutes < 10).ToList();
    //get a List of online users by IsOnline property
    List<MembershipUser> onlineUsers = uManager.GetAllUsers(0, 20, "UserName ASC", out totalRows).Cast<MembershipUser>().AsQueryable<MembershipUser>().Where(u => u.IsOnline==true).ToList();


    Sincerely yours,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
3 posts, 0 answered