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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

Only one log in at a time for each member


Go to End


4 Posts   737 Views

Avatar
JonShutt

Community Member, 244 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
JonShutt

Community Member, 244 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, 5523 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
JonShutt

Community Member, 244 Posts

14 December 2011 at 8:45am

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