Re: Auth and user permission levels

From: Date: Sat, 08 Feb 2003 04:40:47 +0000
Subject: Re: Auth and user permission levels
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-3667@lists.php.net to get a copy of this message
This is a great idea - I just printed out the source for LiveUser and have been paging thru it today. I think I'm going to try it out, seems like a great package. olinux --- Michael Jansen <mj@weltennetz.de> wrote: > > "Markus Wolff" wrote: > > > I'd like to use Auth for allowing access to > different > > sections website > > Hi Markus, > I have added some attributes to the auth table like > realname, > userlevel etc. Then I wrote a function > 'setAdditionalSessionVars()' > which get these Atributes from the table and > register as SessionVars. > ... > function setAdditionalSessionVars(){ > > $db = DB::connect($this->dsn); > > if (isset ( $_SESSION['auth']['username'] ) > > > $username = $_SESSION['auth']['username']; > > $query = "SELECT vorname , nachname, hdz , > userlevel, email "; > $query .= "FROM auth WHERE username = '$username' "; > > $result = $db->getRow($query,DB_FETCHMODE_ASSOC); > > foreach ($result as $k=>$v){ > > $_SESSION[$k] = $v; > > } > > return true; > } else { > return false; > } > } // <<< > > what is to think about that? > > Michael > > > > > > > -- > PEAR General Mailing List (http://pear.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com

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