Post by sva260 » Mon Jun 01, 2020 4:22 pm

Hi ,
Can i Disable Users log out auto after closing Browser ?

Thank you

Newbie

Posts

Joined
Thu May 28, 2020 2:03 pm

Post by paulfeakins » Mon Jun 01, 2020 7:58 pm

Depends how well you can code?

You'll need to add a cookie and then check for it and log someone in automatically if they have it.

More info here:
https://stackoverflow.com/questions/332 ... has-closed

For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Guru Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom

Post by sva260 » Wed Jun 03, 2020 1:28 pm

paulfeakins wrote:
Mon Jun 01, 2020 7:58 pm
Depends how well you can code?

You'll need to add a cookie and then check for it and log someone in automatically if they have it.

More info here:
https://stackoverflow.com/questions/332 ... has-closed
Thank you paulfeakins for replay ,
You know that most users of OpenCart do not know how to write a single line of code, and the reason they choose OpenCart is the ease of installation lol like me ,
If there an extension or simple way to do that it would be awesome for many of us

Newbie

Posts

Joined
Thu May 28, 2020 2:03 pm

Post by letxobnav » Wed Jun 03, 2020 2:52 pm

users or customers?

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by sva260 » Mon Jun 08, 2020 7:38 pm

letxobnav wrote:
Wed Jun 03, 2020 2:52 pm
users or customers?
customers

Newbie

Posts

Joined
Thu May 28, 2020 2:03 pm

Post by letxobnav » Mon Jun 08, 2020 10:29 pm

well, the only difference is that the cookie which holds the session id is a session cookie so:

1) you would have to add a "remember me" checkbox to the login page (with a warning about public computer usage) as people would need to opt-in.
2) you would have to start storing the session data in the database (the only valid reason for doing that) and set the expire date accordingly.
2.1) if you use files, php would normally automatically delete inactive sessions from the file system and you would lose the session data anyway.
3) you would have to keep the "remember me" value in the session and use it in the session class.
3.1) if active, set an expire date to the session cookie (now it is a session cookie without expiration date which means the cookie is deleted when the browser is closed)
3.2) if inactive, set no expire date to the session cookie as is now
4) when sign off, delete the session from the session table.

The main effort is the checkbox really.

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan
Who is online

Users browsing this forum: No registered users and 37 guests