RE: [PEAR] Auth DB Newbie question

From: Date: Wed, 17 Sep 2003 18:26:03 +0000
Subject: RE: [PEAR] Auth DB Newbie question
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-7876@lists.php.net to get a copy of this message
It should be available at $_SESSION['Auth']['data']['u_id']. The $_SESSION['Auth']['data'] array holds the values specified in the db_fields element of the second parameter to the constructor, probably $params in your case. Andy > -----Original Message----- > From: Florian Hohenberger [mailto:medpsych@uni-graz.at] > Sent: Wednesday, September 17, 2003 2:55 AM > To: pear-general@lists.php.net > Subject: [PEAR] Auth DB Newbie question > > Hello, > > in line 193 of Auth/Container/DB.php one can read: > /* Include additional fields if they exist */ > > This works fine by putting the following in the auto-prepend-file: > > $params = array( > "dsn" => "mysql://$user:$pass@$host/$db_name", > "table" => "users", > "usernamecol" => "u_username", > "passwordcol" => "u_passmd5", > "db_fields" => "u_id" > ); > > $query looks like: > SELECT u_username, u_passmd5,u_id FROM users WHERE u_username = > 'WhatTheUserTypedAsUsername' > > Also $entry[$this->options['db_fields']] has u_id as value. > > Now my question: > Can this additional value be accessed somehow, which in my opinion would > be quite useful. > > Florian > > -- > PEAR General Mailing List (http://pear.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

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