summaryrefslogtreecommitdiffstats
path: root/application/controllers/AuthController.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/controllers/AuthController.php')
-rw-r--r--application/controllers/AuthController.php53
1 files changed, 51 insertions, 2 deletions
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
+ }
+
+
}
+
+
+
+
+
+