Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Aiheen aloitti: geomouchet - heinäkuu 25, 2011, 01:14:44 IP

Otsikko: How do I get ssi_login() to allow user to select session expiration
Kirjoitti: geomouchet - heinäkuu 25, 2011, 01:14:44 IP
I have smf 1.1.14.   I am using the SMF login system for my entire web site.  It works fine except everyone is always permanently logged in.  This is OK for most users, but not real great for anyone using a public computer.  Is there any option or setting that would allow the user to check "remember me" or set the login cookie expiration?  If so, where do I set it?
Otsikko: Re: How do I get ssi_login() to allow user to select session expiration
Kirjoitti: geomouchet - heinäkuu 25, 2011, 07:03:23 IP
I just noticed that if I go to index.php?action=login it does have options for minutes to stay logged in and always stay logged in.  How to I get those same options into the login box created by ssi_login()?
Otsikko: Re: How do I get ssi_login() to allow user to select session expiration
Kirjoitti: geomouchet - syyskuu 14, 2011, 02:43:26 IP
In case anyone has the same issue, here is the solution:

Edit SSI.php
Copy the ssi_login function
Change the name to my_login
Add this to the login form:
<select name="cookielength">
  <option value="60">for 1 Hour</option>
  <option value="1440">for 1 Day</option>
  <option value="-1" selected="selected">until you log out</option>
</select>
Otsikko: Re: How do I get ssi_login() to allow user to select session expiration
Kirjoitti: Joker™ - syyskuu 14, 2011, 02:53:52 IP
Sorry for missing this topic somehow. Nice to see that you got it all sorted out yourself.

Marking this topic as solved. Feel free to post here and mark this topic as unsolved if you have further questions regarding this topic.