Example #1
0
 private function authenticate(Zend_form $form)
 {
     $user = new GC\Entity\User($form->getValues());
     $authService = new Application_Service_Authentication($user);
     if (!$authService->authenticate()) {
         throw new Exception('Login Invalid');
     }
 }
 private function _isAuthentic($form)
 {
     $user = new Application_Model_User($form->getValues());
     $authService = new Application_Service_Authentication($user);
     if ($authService->authenticate()) {
         return true;
     } else {
         $form->setDescription('Login failed, please try again');
         return false;
     }
 }