From 63b4fb51d481e4376f60f188c171d57970abbd46 Mon Sep 17 00:00:00 2001 From: Björn Geiger Date: Wed, 13 Apr 2011 15:05:53 +0200 Subject: Suspend und Resume Account --- application/modules/user/controllers/AuthController.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'application/modules/user/controllers/AuthController.php') diff --git a/application/modules/user/controllers/AuthController.php b/application/modules/user/controllers/AuthController.php index d1596ae..a90c8db 100644 --- a/application/modules/user/controllers/AuthController.php +++ b/application/modules/user/controllers/AuthController.php @@ -52,9 +52,14 @@ class User_AuthController extends Zend_Controller_Action $person->setID($result[0]['personID']); $date = new DateTime(); $person->setLogindate($date->getTimestamp()); - $this->personmapper->save($person); - $this->_helper->redirector('selectmembership', 'person'); - return; + if($person->getSuspended()) { + $pbsNotifier = new Pbs_Notifier(); + $this->view->notification = $pbsNotifier->notify('Your Account is suspended', 'error'); + } else { + $this->personmapper->save($person); + $this->_helper->redirector('selectmembership', 'person'); + return; + } } else { $pbsNotifier = new Pbs_Notifier(); $this->view->notification = $pbsNotifier->notify('Wrong Email or Password', 'error'); @@ -95,6 +100,7 @@ class User_AuthController extends Zend_Controller_Action $person = new Application_Model_Person($_POST); $this->personmapper = new Application_Model_PersonMapper(); $date = new DateTime(); + $person->setSuspended(0); $person->setRegisterdate($date->getTimestamp()); $person->setPasswordSalt(MD5($date->getTimestamp())); $person->setPassword(MD5($person->getPassword() . $person->getPasswordSalt())); -- cgit v1.2.3-55-g7522