Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Only one log in at a time for each member


Reply


4 Posts   412 Views

Avatar
Futureweb

Community Member, 233 Posts

6 December 2011 at 3:02pm

Hi all,

In silverstripe, someone can give their log in details with 10 people, who can all log in at once. I'm wondering if there was a clever way of stopping this - so if someone logs in to account this already logged in - either they can't log in, or the other user gets unlogged in (this is how some other systems I know work)

Now, I can see silverstripe knows who is logged in (just below here is a list of users currently online). So i'm thinking it should be possible to do this...

Any ideas?

Jon

Avatar
Futureweb

Community Member, 233 Posts

6 December 2011 at 3:05pm

actually, i did just notice that the forum page said i was currently online even after i'd logged out...
so maybe i can't rely on the that same feature

Avatar
Willr

Forum Moderator, 5513 Posts

13 December 2011 at 9:35pm

The member has a 'Last Logged In' value stored on their account. The forum just checks whether this was less than 10 minutes ago so you can't detect if someone is logged in out of the box but you can implement it using your own code. You would need to use javascript to ping the server every 10, 30s perhaps?

Avatar
Futureweb

Community Member, 233 Posts

14 December 2011 at 8:45am

thanks for the suggestion - and explaining how the forum does it!