Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Log In for General Users

Quote Reply
Log In for General Users
Hello,

Is there a way to make users automatically log in via cookies when they go to the directory? When you close all the windows and go back to the directory you have to login again. I know this would not be good for users with links but how about the average user who rates links etc.

Thanks
Shane


Quote Reply
Re: Log In for General Users In reply to
How would you differentiate between "general" users and "Link Owner" users? That would be a bit difficult. You could probably re-write the authenticate sub and the login script to use client cookies rather than session variables...but differentiating between the types of users would be a bit cumbersome and challenging, IMHO.

Regards,

Eliot Lee
Quote Reply
Re: Log In for General Users In reply to
Well... this would be a case of extending the expire time of the sessions to something like 1 week. A user who comes back in that time would be recognized.

This is something Alex would probably have to address, since he knows how the authenticate module was written, and where it's going.

The w3t authenticate keeps the cookie around...

PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum
Quote Reply
Re: Log In for General Users In reply to
Hi,

You need to edit Links/Authenticate.pm around line 163. You'll see:

my $session_cookie = $IN->cookie ( -name => 's', -value => $session_id, -path => '/' );

You need to add:

-expires => '+1y'

to set the expiry date to one year ahead. Setting expiry times for close intervals (1 hour, 1 day etc) is not reliable due to how cookies are implemented.

Hope this helps,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: Log In for General Users In reply to
It works Alex thank you. I'm automatically logged in after I close all browsers and go to my site.


Shane