summaryrefslogtreecommitdiffstats
path: root/application/modules/user/controllers/AuthController.php
diff options
context:
space:
mode:
authorBjörn Geiger2011-04-13 15:05:53 +0200
committerBjörn Geiger2011-04-13 15:05:53 +0200
commit63b4fb51d481e4376f60f188c171d57970abbd46 (patch)
tree0c5ef7afcae61c36d1b0cb2657598bf2d381b5af /application/modules/user/controllers/AuthController.php
parentZweiter Teil der Rechte in Group Controller (diff)
downloadpbs2-63b4fb51d481e4376f60f188c171d57970abbd46.tar.gz
pbs2-63b4fb51d481e4376f60f188c171d57970abbd46.tar.xz
pbs2-63b4fb51d481e4376f60f188c171d57970abbd46.zip
Suspend und Resume Account
Diffstat (limited to 'application/modules/user/controllers/AuthController.php')
-rw-r--r--application/modules/user/controllers/AuthController.php12
1 files changed, 9 insertions, 3 deletions
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()));