public function authenticate()
{
if (empty($this->user)) {
return new \Zend_Auth_Result(\Zend_Auth_Result::FAILURE_IDENTITY_NOT_FOUND, NULL);
}
if (!$this->user->isActive()) {
return new \Zend_Auth_Result(\Zend_Auth_Result::FAILURE_UNCATEGORIZED, NULL);
}
return new \Zend_Auth_Result(\Zend_Auth_Result::SUCCESS, $this->user->getId());
}