Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Login form: Remember me next time checkbox


Go to End


2 Posts   3767 Views

Avatar
bartvanirsel

Community Member, 96 Posts

11 May 2011 at 5:13am

Hi!

The 'remember me next time' checkbox on the user login form does not seem to work properly.
When checking it and closing the browser and restarting it fast you stay logged in, but doing this
again logs you out. This also happens on this forum btw

Is there a way to fix this?

Thanks,

Bart

Avatar
moloko_man

Community Member, 72 Posts

6 September 2011 at 4:11am

Edited: 06/09/2011 4:14am

Willr or Hamish answered this somewhere, but can't seem to find it right now.

In sapphire/security open Member.php and about line 402 inside Cookie::set() function change $token to $member->RememberLoginToken
so it should look like this:
Cookie::set('alc_enc', $member->ID . ':' . $member->RememberLoginToken, 90, null, null, false, true);

Hope that helps.

The 90 is how many days till it expires (default is 90) but you can set this to whatever you want. I have always left it on default, so not sure how well it will work.