Re: [phplib] kris/test example problems. From: Strange Alex (strange <email protected>)
Date: 05/25/00

Hello Luca,

Thursday, May 25, 2000, 8:50:20 AM, you wrote:

L> thing. When I put the "Load the default auth example." page with no
L> authorization (nobody user) and then I put "Relogin to this page to get
L> permissions (Login as kris, test).", the username/password doesn't work!
L> If I use "Load the complex example again (Login as kris, test)." my
L> username/password works fine. If I'm loged in and the I go to "Load the
L> default auth example.", it shows my user info and permissions fine too.
L> But again, if I put "Relogin to this page to get permissions (Login as
L> kris, test).", my username/password are not accepted (I use the same
L> kris/test that wors with Complex Example).
L> Is there any problem with $auth->login_if(); function???Any ideas of
L> what's going on?????

Its happend because $auth->url(), using at *loginform.ihtml:
   <form name="login" action="<?php print $this->url() ?>" method=post>
returns full URL with query string (like login.phtml?again=yes),
that mean repeat of parametr "again", that should not be.

I define myurl in local auth class
  function myurl() {
    return $GLOBALS["sess"]->url($GLOBALS[PHP_SELF]);
  }
and use it:
<form name="login" action="<?php print $this->myurl() ?>" method=post>

And dont forget to add a cancel button, it helps ;)
<input type=submit name="cancel_login" VALUE="Cancel">

* Hет бы раскошелится и накормить пришельцев...

--
С уважением, Алексей Русанов
Научно-производственное предприятие "Юникон Плюс", Новосибирск
Ведущий специалист отдела Internet технологий
Unix network administrator
Тел:     +7 3832 23-94-06
         +7 3832 10-00-50
Факс:    +7 3832 23-94-06
ICQ UIN: 8397628
URL:     http://www.unicon.ru/
         http://www.H-ck.ru/

--------------------------------------------------------------------- To unsubscribe, e-mail: phplib-unsubscribe <email protected> For additional commands, e-mail: phplib-help <email protected>