Skip to content

How to renew the expiration time? #7

@NeftaliAcosta

Description

@NeftaliAcosta

When instantiating the object, an expiration time is established: For example.
Session::init($lifeTime);
I can also instantiate without expiration date and the session expires until it is destroyed:
Session::destroy($key, $prefix);

Well, I have a system that validates some parameters to access the user control panel and that allows only one login per user, that is, if someone else accesses from another computer, all previous sessions are destroyed and only the most recent one remains active.

The problem is: I do not want the session to be destroyed after a certain time AFTER creating it, rather I want it to be destroyed after a period of inactivity, therefore, what I need is that, every time the user validation is done refresh or re-add the 3600 seconds back to that already active session.

How could I do it?
Thanks for the help.

P.S. I am using Middlewares

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions