Hello guys,
I'm doing some coding to my template and I'm almost finished, however I'm quite surprised, that ZP hasn't user auto logout feature
Please:
1. is there any possibility to simply enable it and set time period ?
2. If not, is there any doc how login / auth is working, please ?
This is the last piece before I'll go live, som many thanks in advance for any help :-)
Ivan
Comments
I'll try to search for correct setting tomorrow, good night :-)
PS: I'm searching for session expiration, not cookie expiration.
Ivan
Sessions also expire based on server/PHP configurations. Zenphoto has no control of them. Normally they will expire when the browser exits.
Have you chosen the "gallery sessions" option? If not sessions are not in play.
Finally, so the user loggout after being idle is controlled only by Apache settings / by .htaccess ?
Hope this is my last question here..
Ivan
As to how you control the timeout. As I mentioned before this is a browser/server determined thing. One of the reasons it is not so popular. I do not think that sessions time out typically from beign idle--they normally stay active so long as the browser has not closed.
To achive that, I'm using either:
1. timestamp written as session variable, refreshed on any user action
OR
2. even more simple, storring session data in the DB instead of flatfile and checking that timestamp on each verification.
Once timestamp is too old in both cases, login is not valid anymore and user has to log in again.
My question here was if there is such mechanish already implemented in ZenPhoto or if I have to code it..
Ivan
I have already added some script to handle access to pictures, as there is possibility to access pictures by direct URL even if the user is not logged in. That's done. Now I'm working on real auth by sessions, not cookies
Guys, good work with this gallery for public use, but really weak for personal use
Not blaming you, just provideing info to another users.
Ivan
OF course you can link to the albums folder and its images direclty as well if you know it. But since the filesystem is out of Zenphoto's control you would need to use htaccess to avoid that. We have a troubleshooting entry about that if I recall right.
But you are right. If gallery should be for public use, then I just had different expectations
Ivan
But if you do this, you have to be sure that your theme does not attempt to directly access the album folder because that will not work for anyone (as you observed) if it is protected as above.
All this is provided for by Zenphoto but not configured out ot the box because it usually is not needed.