coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: comptech520 on September 09, 2007, 02:33:48 PM

Title: How to always stay logged in
Post by: comptech520 on September 09, 2007, 02:33:48 PM
Hello,

I am using Coppermine on my Intranet which requires a login anyways so why log in twice?

How can I ALWAYS stay logged in as an admin with copper mine. Where and what code would I have to add?
Title: Re: How to always stay logged in
Post by: Sami on September 09, 2007, 02:59:41 PM
{gallery-root}/include/functions.inc.php => function create_session()
but this way all of users will take the changes

Edit :
Correct path to create_session() function is
{gallery-root}/include/coppermine.inc.php => function create_session()
Title: Re: How to always stay logged in
Post by: Joachim Müller on September 09, 2007, 03:11:43 PM
You might want to review the LDAP bridge that recently has been contributed.
Title: Re: How to always stay logged in
Post by: comptech520 on September 10, 2007, 12:35:09 AM
I put the
function create_session()
in the correct file and I got some errors

I just want to be logged in as admin all the time


Quote from: Sami on September 09, 2007, 02:59:41 PM
{gallery-root}/include/functions.inc.php => function create_session()
but this way all of users will take the changes
Title: Re: How to always stay logged in
Post by: Joachim Müller on September 10, 2007, 08:03:51 AM
You can not add a second instance of the function definition. Undo your changes.
Why don't you just tick the remember me option when logging in? Did you take a look at the LDAP bridge?
Title: Re: How to always stay logged in
Post by: Sami on September 10, 2007, 08:37:23 AM
As GauGau suggested LDAP bridge would be best option for you under intranet

Quote from: comptech520 on September 10, 2007, 12:35:09 AM
I put the
function create_session()
in the correct file and I got some errors

I just want to be logged in as admin all the time
Sorry that was my mistake !
create_session function is under coppermine.inc.php line #276
You shouldn't put that function anywhere , you just need to change setcookie function's time (CPG_WEEK*2) to something big like this :CPG_WEEK*20 then when you set the remember me option your login stays for 20 weeks