Uutiset:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu
Advertisement:

How do I get ssi_login() to allow user to select session expiration

Aloittaja geomouchet, heinäkuu 25, 2011, 01:14:44 IP

« edellinen - seuraava »

geomouchet

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?

geomouchet

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()?

geomouchet

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>

Joker™

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.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Advertisement: