PHP configurations can be different per provider, it is also possible that a hoster wont let you edit any PHP setting. It can also block changing properties from PHP code and htaccess. This makes it very difficult to make some global setting in Wappler that would work on any host.
Why not thinking more simple and use the remember flag, it uses cookies instead of the session to keep the user logged in. Then you have more control over the timeout.
Hello Brad,
All the remember me does is to set a cookie which keeps you logged it you can set the cookie lifetime in the settings.
Usually you bind this to a checkbox with a value of 1, so when checked in, it keeps you logged.
This is where I am confused then. If the PHP session expires before the cookie, what happens?
Sorry for the dumb questions, just never been able to see a difference when using the remember feature. Plus it is still early morning and have only had half a cup of coffee.
I know what the difference between a cookie and a session is. My problem is that f the security provider uses the PHP session how does using a cookie instead effect it?
So if I use the remember feature, it does not use the PHP session it uses the cookie instead? Just trying to figure out the mechanics of this.
Exactly. So you will be logged in, as long as your cookie lifetime is which could be 30 days
This can be set in the properties panel for the security provider step.
Thanks, that sounds exactly like what I need. I will give it another try today. Does that have to be a checkbox or can I use a hidden field with a static value of 1?
Thanks @patrick. This seems to work better than I would have imagined. Glad to finally know exactly how this feature is suppose to work. This will really make our staff happy!
Default the security provider uses sessions to keep the user logged in, the remember me sets a client cookie that holds the login information and will log the user in again when the session is expired. You can set the expire date for the cookie, so that users are remembered for hours, days or years. You often see it as an option for the user within the login form, but you can also set it yourself in the server action.