From 6c07eb5e85f9705c83b0415a89dd05a19b138bce Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 31 Jan 2011 15:34:21 +0100 Subject: auth controller vervollstÃĪndigt --- application/controllers/AuthController.php | 53 ++++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 2 deletions(-) (limited to 'application/controllers/AuthController.php') diff --git a/application/controllers/AuthController.php b/application/controllers/AuthController.php index cc0bca2..588ffe3 100644 --- a/application/controllers/AuthController.php +++ b/application/controllers/AuthController.php @@ -2,10 +2,11 @@ class AuthController extends Zend_Controller_Action { + public function loginAction() - { + { $db = Zend_Db_Table::getDefaultAdapter(); - + if (!isset($_POST["login"])){ $loginForm = new Application_Form_AuthLogin(); } else { @@ -44,4 +45,52 @@ class AuthController extends Zend_Controller_Action $this->view->loginForm = $loginForm; } + + public function registerAction() + { + $db = Zend_Db_Table::getDefaultAdapter(); + + if (!isset($_POST["register"])){ + $registerForm = new Application_Form_AuthRegister(); + } else { + $registerForm = new Application_Form_AuthRegister($_POST); + + if ($registerForm->isValid($_POST)) { + $person = new Application_Model_Person($_POST); + if ($person != null) { + echo "Erfolgreich registriert"; + # var_dump($person); + //$this->_redirect('/auth/login'); + return; + } else { + echo "Die angegebene Email-Adresse existiert bereits"; + } + } + } + + $this->view->registerForm = $registerForm; + } + + public function logoutAction() + { + // action body + } + + public function recoverPasswordAction() + { + // action body + } + + public function deleteAccountAction() + { + // action body + } + + } + + + + + + -- cgit v1.2.3-55-g7522