Member
Member
indrek   2009-07-11, 23:48
#1

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.

Member
Member
sbillard   2009-07-11, 23:59
#2

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

Member
Member
indrek   2009-07-12, 00:15
#3

Thanks!

Member
Member
amereservant   2011-05-22, 06:48
#4

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.

Administrator
Administrator
acrylian   2011-05-22, 08:40
#5

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

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.