Forum Moderators: coopster

Message Too Old, No Replies

PHPLIB + one user + multiple sessions

         

redbanditos2005

8:39 am on Jul 15, 2003 (gmt 0)

10+ Year Member



Hi there!

How can I avoid new PHPLIB sessions from the same user on the same application?

I mean something like detecting the user and throwing exception "Blahblah you're already logged in..."

Thx for msgs...

hakre

8:42 am on Jul 15, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



hi rebanditos,

use the session data to save username and loginstate. then check against these values if the user already logged in.

is it that what you were asking for?

- hakre

redbanditos2005

8:48 am on Jul 15, 2003 (gmt 0)

10+ Year Member



Yes...

You mean the data from active_sessions table?
Do I need to make some SELECT, or can I get the userID from "auth"?
Could you give me some code sample?

hakre

8:59 am on Jul 15, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



i think it's better to use the pagemanagement functions and the authentication. it should handle your needs.

i first got it wrong, session is not needed for this because the authentication is already supplied by phplib.

redbanditos2005

9:11 am on Jul 15, 2003 (gmt 0)

10+ Year Member



You're right - this is the way...

But I cant find nowhere some samples how to do it.
It seems like nobody uses this feature ;-)

I need some code...