printUserLogin_out();

Hi,

I have a question in my production site (ZP 1.4.04) i made a login page with this code :
`printUserLogin_out();`
The Code work and a Login box are display when the User are not log in.
In the 1.4.1-BETA [7254] version, the same code doesn't display the login box.

Did you change something ? I just find this help : `http://www.zenphoto.org/documentation/plugins/_zp-extensions---user_login-out.php.html#functionprintUserLogin_out`

I also look in the zenpage theme and in the default theme, you use this function and it's works.

What does I miss ?

Laurent

Comments

  • acrylian Administrator, Developer
    You probably did not set the (only) plugin option for showing the form if logged out.
  • Laurent Member
    I check, the user_login_out plugin is activate. I also activate the option in this plugin to display the box.

    When i activate your zenpage theme or the default theme is work on my test site but when i activate my theme, the box are not display.
    I also cut/paste the code in my login php file ... nothing appears.

    Does the login state is store in the database ?

    Laurent
  • So, how is "login.php" activated on your theme? A good idea when something works in one of the themes we distribute (or some other third party theme) but does not in what you are working on is to look at how the working theme does the code.

    At least none of the distributed themes use a "logon.php" script. If the script is not loaded then the function will not get called.
  • Laurent Member
    What do you what to say by activated ?

    Before, in ZP 1.4. i just use the printUserLogin_out(); alone.

    Does i have to use another option before. I look at the code in sidebar.php in zenpage, you just use this :
    `
    if(function_exists("printUserLogin_out")) {
    ?>
    <?php
    if (zp_loggedin()) {
    ?>

    • <?php
      }
      printUserLogin_out("","");
      if (zp_loggedin()) {
      ?>

    <?php
    }
    }
    `
    and in default theme:

    `
    if (function_exists('printUserLogin_out')) {
    printUserLogin_out(" | ");
    }
    `
    Is the code i use.

    Laurent
  • You say that the function call is in a script named login.php. If so, that script has to be run in order for the function to be called. Since it is not one of the standard scripts I wonder how it is being run. Because, of course, if it is not run that would entirely explain your problem.
  • Laurent Member
    Hi,

    I see the micheall topic here : `http://www.zenphoto.org/support/topic.php?id=9232`
    So i look in my theme directory and i have the `password_form.php` file. I you say i delete this file and now the `printUserLogin_out` function do is job.

    Thanks
    Laurent

    PS : I think i have a another mistake, but before i have to investigate a little more.
  • Good you found this. A lesson to be learned is that if something is not working you should always check for PHP errors. The thread you cite does mention an error of a deprecated function.
Sign In or Register to comment.