Gossamer Forum
Home : Products : Gossamer Links : Discussions :

user logging out

Quote Reply
user logging out
Hiya

In links you can get a user to login - is there any kind of logout function built into Links? We want to be able to display if a user is logged in a logout link and vice versa.
If there is no such function, which tables are written to when a user logs in? - and would it simply be a case of cleaning up the session data that was created when the user logged in?

Cheers

Hannah
Quote Reply
Re: [hannahmackenzie] user logging out In reply to
Not a built-in feature, but you could query the "Sessions" table to see who is logged in and not. What I've done (with Links SQL v.1.13, but a lot easier to do with Links SQL v.2.X) are the following features:

1) Offer a LOGOUT link that basically will delete the row/record of the user in the "Sessions" table.

2) On a nightly basis, I EMPTY (DELETE FROM Sessions) all rows/records. This is done to prevent people from staying "logged" in public computer environments, like computer labs, cybercafes, etc. And since a majority of my site's hits comes from these public environments...added security doesn't hurt....
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Heckler] user logging out In reply to
Eliot,

can you explain how to view the logged-in-users?

Probably there is a template-global needed, isnīt it?

Michael

--
Michael Skaide

http://www.cycle24.de

Quote Reply
Re: [Michael Skaide] user logging out In reply to
It is a sort of "global" (keep in mind that I am still using v.1.13 and will continue for quite some time)...basically it is mattering of including the following query in the global sub that you write:

Quote:

SELECT DISTINCT(Sessions.FKColumnName)
FROM Sessions LEFT JOIN Users ON Sessions.FKColumnName = Users.PKColumnName
ORDER BY Users.OtherColumnName


Get to know SQL and you'll be more successful at creating globals and modifying Links SQL...

Best of luck!
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Heckler] user logging out In reply to
Thanks for the pointers Eliot.

Best wishes

Hannah