ZF-3277: Zend_Auth_Adapter_OpenId example error
Description
Hi,
On: http://framework.zend.com/manual/en/…
The example contains the following:
if (!$result->isValid()) {
$status = "You are logged-in as " . $auth->getIdentity() . "
\n";
} else {
$auth->clearIdentity();
foreach ($result->getMessages() as $message) {
$status .= "$message
\n";
}
}
However this has a negation in the wrong place. To work it need to be:
if ($result->isValid()) {
$status = "You are logged-in as " . $auth->getIdentity() . "
\n";
} else {
$auth->clearIdentity();
foreach ($result->getMessages() as $message) {
$status .= "$message
\n";
}
}
Note removal of ! in outer if statement.
Comments
Posted by Wil Sinclair (wil) on 2008-09-02T10:39:37.000+0000
Updating for the 1.6.0 release.