ZenphotoCMS Forum
Check if user has album access - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: Check if user has album access (/thread-5471.html)



Check if user has album access - indrek - 2009-07-11

How can I check whether user has entered the album password?

Using default theme, I put a printAlbumZip() link on the album.php
The problem is when a user tries to access the album and hasn't entered the password, he can still see the link for downloading zip file. Clicking on it gives some nasty errors, so I thought it would be nice to hide it from the user until he can actually see the album and use the link.




Check if user has album access - sbillard - 2009-07-11

if (!checkForPassword(true)) { printAlbumZip() ; }




Check if user has album access - indrek - 2009-07-12

Thanks!




Check if user has album access - amereservant - 2011-05-22

I've been looking for how to test this myself and checkForPassword() doesn't help any, but instead triggers a fatal error about it not being defined.

What I need to do is make SURE no album thumbnail is shown for protected albums, but I need a way to test for that and if whether or not the user is actually logged in for that album.




Check if user has album access - acrylian - 2011-05-22

This topic is quite old and a lot has changed. There are now class methods for each item type to check the access.