Zend_Auth::getInstance()->getStorage()->write($identity);
Where $identity will contain the same type of structure / data that is generated when a user logs in through a standard mechanism. For example, given this example code in the login action:
$adapter = $this->getAuthAdapter($form->getValues()); $auth = Zend_Auth::getInstance(); $result = $auth->authenticate($adapter); if ($result->isValid()) {
$result->getIdentity() will return the identifier, if valid.
source share