• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Not planned "Stay Logged In" improvement

Vincent

Well-known member
#1
Hello,

Something that quite bothers me, is having to keep clicking the "Stay Logged In" button. I still don't get why this isn't by default.

So I found a way to let the Administrator choose whether to enable this or not.

Step 1: Create a New Option
stay_logged_in.png

I called mine "stay_logged_in_default"

Step 2: Enter it in the Code
In the template called login_bar_form, change
Code:
<label for="ctrl_remember" class="rememberPassword"><input type="checkbox" name="remember" value="1" id="ctrl_remember" tabindex="103" /> {xen:phrase stay_logged_in}</label>
to
Code:
<label for="ctrl_remember" class="rememberPassword"><input type="checkbox" name="remember" value="1" id="ctrl_remember" {xen:checked '{$xenOptions.stay_logged_in_default}'} tabindex="103" /> {xen:phrase stay_logged_in}</label>
NOTE: This also has to be done for the non-javascript version of the login page.

That's it.
This way the Administrator can choose whether or not he wants Stay Logged In to be enabled by default or not.
 

Vincent

Well-known member
#4