How to check if album password has been entered?

Is there a way to check if a guest has entered the password for a password-protected album?

I tried using checkforPassword(), but this returns true even after the guest has entered the album password.

I have a sidebar in Wordpress that is only displayed on my protected album's url. However, I only want it to display after the user has entered the password, I don't want it to display on the password form page.

Hope this makes sense...thanks!

Comments

  • Maybe it is not completely clear.

    With the current Zenphoto, your theme has no need for the `checkForPassword()` function as the theme scripts will not be loaded unless the page is accessable. There is not an easy way to tell if someone visiting an unprotected page is logged in though.

    If you are using `checkforPassword(true)` from the wordpress it will return `true` if a password was needed (the form is not displayed because of the `silent` parameter). This is also true if you use the function from your theme, but you will not be executing the call unless the login is already acomplished.

    So, if I understand correctly, you want a sidebar to display on your gallery pages (except for the password form page) if the user is logged in. So you should be able to just display the sidebar on each script except the password form one.
  • I didn't explain it very well...

    I am the only Zenphoto user, anyone visiting my site doesn't login to Zenphoto. I do have one password-protected album, however, that they would need the password to access.

    I figured out my problem, I just need to rearrange my Wordpress sidebars and then not call that particular one on my Zenphoto password page.

    Thanks for your help!
Sign In or Register to comment.