Re: [phplib] PHPLib Page Entry Behavior From: John Sutton (john <email protected>)
Date: 09/08/00

On Fri, 08 Sep 2000, you wrote:
> 1/ When a user has a plain vanilla session, and enters the
> 'defauth.php3' or 'showoff.php3'(login) pages PHPLib says, "BAD DOG!
> What, you think already having just a session is enough?! Your session
> is not authorized for this page Nyah Nyah!"
>
> ----Actually, it says:
> #Permission denied
> #
> #Your session a4bfd26fa88176f4f4c793123b5a4ac8 has been authenticated
> with a user id of #nobody and a user name of
> #(unknown).
> #
> #To access this page, the following permissions are required: admin.
> #I won't let you access this page, because you have these permissions: .
>
> Why not just ask the user for a login, update his session if it's
> successful and give him the page he wants, or give him a "BAD DOG"
> message and then return him to the page he came from (IF HTTP_RFERRER is
> valid)?
>
> Can this behavior be changed to the one I am mentioning by extending
> classes?

The examples provided in /pages are perhaps a bit misleading. It's a case of
NOT extending classes to get the behaviour you are asking for! Comment out line
114 in the supplied local.inc:

var $nobody = true;

to get the default behaviour of the class. Then hit defauth.php3 or
showoff.php3.

regards

***************************************************
John Sutton
SCL Computer Services
URL http://www.scl.co.uk/
Tel. +44 (0) 1239 621021
***************************************************

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