jedno od resenja je da se sesije drze u bazi
time se dobija mogucnost da se pri isticanju sesija pozove neka funkcija
ADODb vec ima gotovo resenje za takve stvarcice
Kôd:
$ADODB_SESSION_EXPIRE_NOTIFY = array('USERID','NotifyFn');
par zanimljivih stvari koje se mogu uraditi kada se koristi baza:
Citat:
ExpireRef normally holds the user id of the current session.
1. You can then write a session monitor, scanning expireref to see who is currently logged on.
2. If you delete the sessions record for a specific user, eg.
Kôd:
delete from sessions where expireref = '$USER'
then the user is logged out. Useful for ejecting someone from a site.
3. You can scan the sessions table to ensure no user can be logged in twice. Useful for security reasons.
|
http://phplens.com/lens/adodb/docs-session.htm