Re: [phplib] Default Authentication, $nobody and confusion From: Spruce Weber (sprucely <email protected>)
Date: 07/20/00

The problem is that after you login, if login_if() is called again it
proceeds to delete your authentication info and force a relogin. My solution
is to only call login_if() if your uid is "nobody", which is the case with
default authentication...

if($auth->auth["uid"] == "nobody")
  $auth->login_if($authenticate);

>From: Dave Tilley <dave <email protected>>
>Reply-To: dave <email protected>
>To: phplib <phplib <email protected>>
>Subject: [phplib] Default Authentication, $nobody and confusion
>Date: Thu, 20 Jul 2000 12:08:55 -0400
>
>
>
>Howdy,
>
> Ok, I have been using PHPLIB for a few months and i am diggin' it in a
>big way, it has saved me tons of time and effort.
>
>However, i am pulling my hair out trying to understand how this "default
>authentication" and $nobody works!
>
>I can't make default authentication behave in the demo pages shipped
>with PHPLIB, and i can't make it work with my own sites either...well,
>let me clarify, here is what happens:
>
>- The default authentication works fine on pages that don't require
>special privs and behave as though i am really 'nobody'...so that part
>is great!
>
>- However, when i go to log in via the $auth->login_if($again)
>mechanism, i can not seem to sucessfully log in under ANY user name.
>Even adding debugging code to auth_validatelogin(), i can see the
>password comparison work and the $uid returned correctly, yet i always
>get bounced back to the "login again - wrong username/password" screen.
>WHY????
>
>What am i doing wrong? Is there another function i need to implement or
>is there additional PHP code i need to modify in local.inc???
>
>I would really appreciate a thorough explanation...i have searched the
>archives of the PHPLIB-list and found mention of this problem several
>times and requests for help, but have never found anyone explaining the
>solution!
>
>I will volunteer to write up what i have learned for the PHPLIB website
>if someone will help me get this working.
>
>
>thanks,
> -dave
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: phplib-unsubscribe <email protected>
>For additional commands, e-mail: phplib-help <email protected>
>

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

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