PEAR::Auth bug
| From: | Wolfram Kriesing | Date: | Tue, 09 Oct 2001 11:49:20 +0000 |
| Subject: | PEAR::Auth bug | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-2200@lists.php.net to get a copy of this message | ||
PEAR::Auth::getUsername and also getPassword
access some array named user_data, i think this needs change!
it doesnt return the username, i guess it needs to read the session data!?
if i use the following example, which is at the top of the class (after
correcting the getUsername method, see above)
the login works, message "Welcome user X" appears, but when i reload the page
then the message is: "Welcome user "
because the session data are not read ... if i am not wrong
* // We use a MySQL as storage container in this example
* $a = new Auth("DB","mysql://martin:test@localhost/test");
*
* // Detect, if the user is already logged in. If not, draw the
* // login form.
* $a->start();
*
* if ($a->getAuth()) {
* echo "Welcome user ".$a->getUsername()."!<br>\n";
* // output the content of your site, that is only visible
* // for users which have been authenticated successfully.
* }
Wolfram