diff options
| author | michael pereira | 2011-04-13 15:31:33 +0200 |
|---|---|---|
| committer | michael pereira | 2011-04-13 15:31:33 +0200 |
| commit | c8aae2da451be228d8059af6bb6603985fbac212 (patch) | |
| tree | d711c0803bfda886ce07afb001f014f2492b8a11 /application/modules/user/controllers/AuthController.php | |
| parent | User login + homeverzeichnis in config (diff) | |
| parent | Merge branch 'master' of ssh://git.openslx.org/lsfks/master-teamprojekt/pbs2 (diff) | |
| download | pbs2-c8aae2da451be228d8059af6bb6603985fbac212.tar.gz pbs2-c8aae2da451be228d8059af6bb6603985fbac212.tar.xz pbs2-c8aae2da451be228d8059af6bb6603985fbac212.zip | |
Merge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2
Diffstat (limited to 'application/modules/user/controllers/AuthController.php')
| -rw-r--r-- | application/modules/user/controllers/AuthController.php | 12 |
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())); |
