summaryrefslogtreecommitdiffstats
path: root/application/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'application/controllers')
-rw-r--r--application/controllers/AuthController.php53
-rw-r--r--application/controllers/PersonController.php28
2 files changed, 52 insertions, 29 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
+ }
+
+
}
+
+
+
+
+
+
diff --git a/application/controllers/PersonController.php b/application/controllers/PersonController.php
index 65a4cca..986117a 100644
--- a/application/controllers/PersonController.php
+++ b/application/controllers/PersonController.php
@@ -18,33 +18,7 @@ class PersonController extends Zend_Controller_Action
// action body
}
- public function registerAction()
- {
- $db = Zend_Db_Table::getDefaultAdapter();
-
- if (!isset($_POST["register"])){
- $registerForm = new Application_Form_PersonRegister();
- } else {
- $registerForm = new Application_Form_PersonRegister($_POST);
-
- if ($registerForm->isValid($_POST)) {
- $person = new Application_Model_Person($_POST);
- var
- if ($person != null) {
- echo "Erfolgreich registriert";
- var_dump($person);
- var
- //$this->_redirect('/auth/login');
- return;
- } else {
- echo "Die angegebene Email-Adresse existiert bereits";
- }
- }
- }
-
- $this->view->registerForm = $registerForm;
-
- }
+
}