I tried using:
// do login if request is posted
if (isset($_POST) && !empty($_POST)) {
// do authencation
...
} else {
// request not posted
// see if already logged in
if (Zend_Auth::getInstance()->hasIdentity()) {
echo "already logged in as: " . Zend_Auth::getInstance()->getIdentity();
}
}
Zend_Auth::getInstance()->hasIdentity()
seem to be always false ... even after a login