Пример #1
0
 public function SignOnFormSubmitted(NAppForm $form)
 {
     // Login form submitted
     try {
         $this->user->login($form['name']->getValue(), $form['password']->getValue());
         $this->user->setExpiration(30 * 60, TRUE, TRUE);
         // set expiration 30 minuts
         if (ACL_CACHING) {
             unset($this->cache['gui_acl']);
             // invalidate cache
         }
         $this->redirect('Default:');
     } catch (NAuthenticationException $e) {
         $form->addError($e->getMessage());
         $form->setValues(array('name' => ''));
     }
 }