Album password protection problem

When a guest user goes to view an album that it password protected and it comes up with the box asking for the login details it only has a space for the password not the username therefore it wont logon!! Why is it doing this??

Comments

  • Probably because you told it not to. Check your options.
  • I'm having the same issue on a fresh install of ZenPhoto 1.4.1.6 [8326]. Mind you, I'm brand new to ZenPhoto, but assuming that I told it not to would be quite obtuse. Telling people to check the options without directing them to documentation that would be helpful is not very helpful. Especially since doing a search in the user documentation doesn't yield very good results:
    http://www.zenphoto.org/page/search/album+password

    The simple fact that that you can set a username when setting the password should make the album credentials prompt more dynamic and thorough. I feel this is a bug, or poor implementation ... you pick (and justify). Better implementation might be dones as shownd below ...

    When prompting for credentials:
    `
    if (strlen($album_username_as_called_from_db) > 0) {
    //Display username field
    } else {
    //Don't display username field
    }
    `
    When processing the credentials entered:
    `
    if (strlen($album_username_as_called_from_db) > 0) {
    if ($album_username_as_called_from_db == $album_username_from_form) {
    //confirm password
    } else {
    //Send Credentials error
    //ie: return $false
    }
    } else {
    //confirm password
    }
    `
  • My error. I thought that the question was how to get the user name field to show on the login form. The answer to that is to set the option. Any other answer requires either that one modify Zenphoto code or that one wait until someone else does so.

    If you are comfortable with modifying the Zenphto core by all means insert the code you show. Note, however, that we do not recommend such modifications as updates tend to obliterate them.
  • acrylian Administrator, Developer
    Just to note: We don't have direct documentation on options itself on our site as the documentation is generally right on the options on the backend itself.
Sign In or Register to comment.