Copied to clipboard

Flag this post as spam?

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


  • Neil Hartley 10 posts 31 karma points
    Apr 16, 2015 @ 18:20
    Neil Hartley
    1

    Logged in members

    Does anybody know of a way to find out if a member is currently logged in (not the current member)

    So something like, Members.GetMemberByEmail("[email protected]").IsLoggedIn();

    Any help on this would be much appreciated

    Thanks

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Apr 16, 2015 @ 20:12
    Alex Skrypnyk
    1

    Hi Neil,

    Out of the box umbraco Member Service doesn't support such method. You can look at LastLoginDate field, and get all members who was only last 20 minutes for example.

    Thanks

  • Ryios 122 posts 263 karma points
    Apr 16, 2015 @ 22:44
    Ryios
    1

    Yeah the only thing you can do in just about any authentication setup out of the box is get all the users who last logged in less than 20 minutes ago or w/e your login session expiration time is set to.

    Http is Stateless, so technically people are only logged in during page requests. Once the request is processed they are gone.

    You could engineer a big complex solution to do it, with an ajax postback on a timer, but it get's overkill real quick, when you can just consider any user who logged in within the last 20 minutes to be logged in.

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Apr 17, 2015 @ 10:26
    Alex Skrypnyk
    0

    Hi Ryan,

    This is what I mean )) Great idea for new package for Umbraco )) I think a lot of sites need statistic about how many users are in the site, but Google Analytics can do it for you ))

    Thanks

Please Sign in or register to post replies

Write your reply to:

Draft