Re: Possible BC break in between Auth 1.3.0 and 1.3.1
| From: | Mika Tuupola | Date: | Tue, 12 Sep 2006 13:56:23 +0000 |
| Subject: | Re: Possible BC break in between Auth 1.3.0 and 1.3.1 | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-43931@lists.php.net to get a copy of this message | ||
On Sep 12, 2006, at 14:03, Mika Tuupola wrote:
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.A Quick note. If I add $options['db_fields'] = '*'; then username will appear in $_SESSION['_authsession']['username'] Trying something like $options['db_fields'] = array('username') does not seem to work.
Check this unorthodox example: -cut- $a = new Auth('DB', $dbha, 'displayLogin'); $a->start(); /* kludge, store password in the session so we can force */-- Mika Tuupola http://www.appelsiini.net/~tuupola//* 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/ --PEAR Development Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php