Jump to content

Remember me function with modules Login/Register and LoginPersist


Recommended Posts

Hi guys,

I’m stuck on trying to set up a Remember Me function for frontend user logins. I’m using Login/Register to handle the logic and everything is running fine. To add the option of keeping users with a specific role persistently logged in, I’ve installed LoginPersist which does exactly what I want, as long as I use it in Automatic mode. Since it’s not always a good idea to play games in the background without letting the user know, I would prefer to let him check whether he wants to be remembered or not and use LoginPersist in Manual Mode. The doc says:


In manual mode, you must call a module function yourself to create the persistent login cookie. For example, this can be in response to a 'Remember Me' checkbox on a login form, indicating their preference to remain logged in.

I will probably be able to check the response, my problem is to get the Remember Me checkbox into the form, ideally between the password field and the submit button. The form is rendered with $loginRegister->execute(); My guess is to hook somewhere in one of the loginRegister methods, but unfortunately I can’t find a working approach.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...