Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Mike Delamater 5 posts 75 karma points
    Nov 14, 2019 @ 17:17
    Mike Delamater
    0

    v7.x Show Online Members - Who's Online

    I would like to be able to list all the members who are logged into my site. I have searched and searched and can find nothing on how to do this in v7. I found some ancient stuff from 2009, but nothing for 7.x. Is it even possible still?

    Thanks guys!

    -Mike D

  • MM 29 posts 125 karma points
    Nov 15, 2019 @ 16:30
    MM
    0

    I've used a package called Dialogue which uses the following for getting Active Members - not sure it does exactly what you need but should give you an idea of where to look:

        public IList<Member> GetActiveMembers()
        {
            // Get members that last activity date is valid
            var date = DateTime.UtcNow.AddMinutes(-DialogueConfiguration.Instance.TimeSpanInMinutesToShowMembers);
            var ids = _memberService.GetMembersByPropertyValue(AppConstants.PropMemberLastActiveDate, date, ValuePropertyMatchType.GreaterThan)
                .Where(x => x.IsApproved && !x.IsLockedOut)
                .Select(x => x.Id);
            return MemberMapper.MapMember(ids.ToList());
        }
    
  • Mike Delamater 5 posts 75 karma points
    Nov 15, 2019 @ 17:22
    Mike Delamater
    0

    Can you show me the usings part too?

Please Sign in or register to post replies

Write your reply to:

Draft