public function loginFormSubmitted(AppForm $form) { try { $values = $form->values; //if ($values['remember']) { $this->user->setExpiration('+ 1 month', FALSE); //also in config.neon#session //} else { // $this->user->setExpiration(0, TRUE); //} //TODO expiration(0) breaks uploadify $this->user->login($values['username'], $values['password']); if (isset($values['backlink'])) { $this->application->restoreRequest($values['backlink']); } $this->redirect(":Admin:Admin:"); } catch (AuthenticationException $e) { $form->addError($e->getMessage()); } }
public function deleteOnFormSubmitted(AppForm $form) { if ($form['delete']->isSubmittedBy()) { try { $id = $this->getParam('id'); dibi::query('DELETE FROM [' . TABLE_ACL . '] WHERE id=%i;', $id); $this->flashMessage('The access has been deleted.', 'ok'); if (ACL_CACHING) { unset($this->cache['gui_acl']); // invalidate cache } $this->redirect('Permission:'); } catch (Exception $e) { $form->addError('The access has not been deleted.'); throw $e; } } else { $this->redirect('Permission:'); } }