Default_Auth Relogin

Help
2004-09-02
2004-09-03
  • I can't relogin from nobody to another user - don't get loginform. Why? Thanks.
    I use this code:

    include("phplib/prepend.php");

    page_open(array("sess" => "Example_Session", "auth" => "Example_Default_Auth"));

    $auth->login_if($again);

    if ($auth->auth["uid"] == "nobody"):
    ?>

    <a href="<?php $sess->purl("$_SERVER[PHP_SELF]?again=yes") ?>">Login</a>

    <?php

    endif

    page_close();

     
    • Soryy, I have understood:)
      It is necessary login_if($_GET[again])

       
    • And still one question. After login_if or logout impossible to load default auth page. For example, user nobody has decided not login but after login_if he get login request on any default auth page.
      Sorry for my english.

       
    • :)
      "To exit from this state, you have to set a global, which by default is $cancel_login (but you may change the name via $auth->$cancel_login) in
      all public pages. If you think your users are a bit smarter, provide a "cancel" button in the loginform.ihtml which calls
      $sess->url("a/public/page.php3?cancel_login=1"). "