coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 permissions => Topic started by: Jr. tristan on April 09, 2006, 05:59:42 AM

Title: Could it possible to set time-out time after login?
Post by: Jr. tristan on April 09, 2006, 05:59:42 AM
Registered users have permission to view my album.
But they are not visit frequently, such that they are not familiar to the coppermine system.
They always forget to logout after login.

Could it possible to set time-out time after login just like the one @ login screen of this support forum?

Thanks
Title: Re: Could it possible to set time-out time after login?
Post by: Joachim Müller on April 09, 2006, 09:36:31 AM
what's wrong with not logging out and being authenticated automatically when returning? Most people consider this to be a feature.
Title: Re: Could it possible to set time-out time after login?
Post by: Nibbler on April 09, 2006, 03:24:22 PM
You can set that up in bridge/coppermine.inc.php

Session lifetime

                // Lifetime of 'remember me' session is 2 weeks
                $rememberme_life_time = time()-(CPG_WEEK*2);
       
                // Lifetime of normal session is 1 hour
                $session_life_time = time()-CPG_HOUR;


Cookie expiry time

                // set the session cookie
                setcookie( $this->client_id, $this->session_id, time() + (CPG_WEEK*2), $CONFIG['cookie_path'] );
Title: Re: Could it possible to set time-out time after login?
Post by: Jr. tristan on April 10, 2006, 02:40:43 PM
Quote from: GauGau on April 09, 2006, 09:36:31 AM
what's wrong with not logging out and being authenticated automatically when returning? Most people consider this to be a feature.

However, that feature could already be done by ticking the check box at the login page.

Categories of cpg have no password setting.
And I want registered users could gain access to most of my albums, but sometimes they are not using a private computer (such as internet cafe and office).
Title: Re: Could it possible to set time-out time after login?
Post by: Jr. tristan on April 10, 2006, 02:53:59 PM
Quote from: Nibbler on April 09, 2006, 03:24:22 PM
You can set that up in bridge/coppermine.inc.php

Session lifetime

                // Lifetime of 'remember me' session is 2 weeks
                $rememberme_life_time = time()-(CPG_WEEK*2);
       
                // Lifetime of normal session is 1 hour
                $session_life_time = time()-CPG_HOUR;


Cookie expiry time

                // set the session cookie
                setcookie( $this->client_id, $this->session_id, time() + (CPG_WEEK*2), $CONFIG['cookie_path'] );



Thank you for your assistance.

Please show or highlight the variable that I could or have to change.
What happen if life time of normal session is smaller than "remember me" session.
Which one overule another. thanks.