Re: [Phplib-users] Default Auth? 7.2d
Brought to you by:
nhruby,
richardarcher
From: <fr...@on...> - 2002-02-13 21:42:27
|
On Wed, Feb 13, 2002 at 11:05:03AM -0700, Jacob Hanson wrote: > The Default Auth feature seems like it should do the trick, but it's > not working. I've set library.php to use my default_auth subclass, but > I'm still getting the login page when I try to access library.php. It doesn't work to use different Auth subclasses on different pages of the same website. Whatever Auth subclass appears in the first page_open() that the user visits will be the auth class for all pages visited in the site while that session persists. A common approach to allowing unrestricted access to some pages and not others is to set up the application's Auth subclass to use "default authentication" -- $auth->nobody == true -- and then force login on restricted pages by using something like this right after calling page_open(): $auth->login_if($auth->auth["uid"] == "nobody"); -- Fred Yankowski fr...@on... tel: +1.630.879.1312 OntoSys, Inc PGP keyID: 7B449345 fax: +1.630.879.1370 www.ontosys.com 38W242 Deerpath Rd, Batavia, IL 60510-9461, USA |