Re: can you designate an authorization level in AUTH?

From: Date: Mon, 01 Nov 2004 14:38:17 +0000
Subject: Re: can you designate an authorization level in AUTH?
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-15273@lists.php.net to get a copy of this message
I do an ugly hack along the lines of the following: if ($myAuth->getAuth()) { if ($myAuth->getUserName() =='admin') { // Do this } else { // Do this } } My only problem with Auth is the loginfunction will through the login boxes whereever. This doesn't get along too well with Smarty, so I've done this: $auth = & new Auth('File',PWFILE,'loginFunction); $smarty = & new Smarty; ob_start(); $auth->start(); $strLogin=ob_get_contents(); ob_end_clean(); $smarty->assign('login', $strLogin); There's probably other ways to do it, but this has worked for me in the past. I'm getting my flame-proof suit on now... Jason On Mon, 1 Nov 2004 05:08:16 -0800 (PST), Stowe Spivey <spiveyspivey@yahoo.com> wrote: > I need to designate one of two authorization levels in my > application. Is there a way to do that using AUTH? > > If not, please suggest alternative. > > Many thanks! > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > -- > PEAR General Mailing List (http://pear.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.pear.general (#15273) next »