Gossamer Forum
Home : Products : DBMan : Installation :

Add-on to logoff

Quote Reply
Add-on to logoff
Can somebody give me the line (to add to the script) to delete the file (user authectic file) in auth directory when user logoff.. So the user (other person using the same computer) can't hit back button and continue to access the database...
Quote Reply
Re: Add-on to logoff In reply to
You would want to make a call to unlink() to remove the session file.

Shouldn't be too hard, but because it erases file, your on your own. =)

Cheers,

Alex
Quote Reply
Re: Add-on to logoff In reply to
Well, i will try that, but what is the words (the syntax if you don't mind) to use to delete thats file. I just play with cgi about a week now.. give me some other hint since i will not get the cgi book (borrow from university library) until dec 16.
Quote Reply
Re: Add-on to logoff In reply to
Hi aneip,

What about changing the time stamp of the login (as opposed to removing the auth file). This way, the user will have to login again.

I donīt know how to do it but it is an idea... :-)

Anyone?
Quote Reply
Re: Add-on to logoff In reply to
Well, deleting the auth file is better because it will not mess up you directory.. I really need this feature because I alway on public terminal when handling my page.... Hope somebody will add this feature and please do email me if you ever make this feature....
Quote Reply
Re: Add-on to logoff In reply to
Ok... well, it works now... This script will delete the auth file and waaala, user can't use back button and perform other task to database until it relogin... Smile
it seem that i answer my own question.
Quote Reply
Re: Add-on to logoff In reply to
How about posting the syntax for that so some of us newbies can implement it..?
Thanks.

pete
Quote Reply
Re: Add-on to logoff In reply to
pete,
just add this - unlink ("$auth_dir/$uid"); - to this line

elsif ($in{'logoff'}) { &auth_logging('logged off') if ($auth_logging);

--
so it will be this


elsif ($in{'logoff'}) { &auth_logging('logged off') if ($auth_logging);unlink ("$auth_dir/$uid");