Possible BC break in between Auth 1.3.0 and 1.3.1
| From: | Mika Tuupola | Date: | Tue, 12 Sep 2006 11:03:21 +0000 |
| Subject: | Possible BC break in between Auth 1.3.0 and 1.3.1 | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-43930@lists.php.net to get a copy of this message | ||
Just noticed that one of my apps stopped working after upgrading Auth. I know I use it in an unorthodox way, but this might affect normal usage too. Will investigate further.
Problem is that $_SESSION['_authsession']['username'] is now empty. If using 1.3.0 the username is there. $a->getUsername() also returns empty value.
Check this unorthodox example:
-cut-
$a = new Auth('DB', $dbha, 'displayLogin');
$a->start();
/* kludge, store password in the session so we can force */
/* authentication without POST:ing */if ($_POST['password']) {
$a->setAuthData('password', $_POST['password']);
}
$username = $_SESSION['_authsession']['username']; /*this is empty if using 1.3.1 or 1.3.2*/
$password = $_SESSION['_authsession']['data'][password];
$a->_loadStorage();
if (true !== $a->storage->fetchData($username, $password, false)) {
$a->logout();
die();
}
-cut-
--
Mika Tuupola
http://www.appelsiini.net/~tuupola/