diff options
author | michael pereira | 2011-03-29 11:01:35 +0200 |
---|---|---|
committer | michael pereira | 2011-03-29 11:01:35 +0200 |
commit | ecb5c8d8c31ad70bb24e0ea1cfb6110bcd0a96bb (patch) | |
tree | 4b40a4178c2dc3bd3fe21730a29dd07bb8742790 /application/modules/user/controllers/AuthController.php | |
parent | Preboot User Controller fertig, ACL fehlt noch (diff) | |
parent | selectmembership von auth zu person verschoben fbgui module (diff) | |
download | pbs2-ecb5c8d8c31ad70bb24e0ea1cfb6110bcd0a96bb.tar.gz pbs2-ecb5c8d8c31ad70bb24e0ea1cfb6110bcd0a96bb.tar.xz pbs2-ecb5c8d8c31ad70bb24e0ea1cfb6110bcd0a96bb.zip |
zfconf
Diffstat (limited to 'application/modules/user/controllers/AuthController.php')
-rw-r--r-- | application/modules/user/controllers/AuthController.php | 41 |
1 files changed, 24 insertions, 17 deletions
diff --git a/application/modules/user/controllers/AuthController.php b/application/modules/user/controllers/AuthController.php index db47f44..5d63b20 100644 --- a/application/modules/user/controllers/AuthController.php +++ b/application/modules/user/controllers/AuthController.php @@ -74,6 +74,7 @@ class User_AuthController extends Zend_Controller_Action $auth = Zend_Auth::getInstance(); $auth->clearIdentity(); Zend_Session::namespaceUnset('userIDs'); + Zend_Session::forgetMe(); $this->_helper->redirector('login', 'auth'); return; } @@ -119,25 +120,31 @@ class User_AuthController extends Zend_Controller_Action public function deleteAction() { - $this->_helper-> viewRenderer-> setNoRender(); - $result = $this->personmapper->findBy('email', Zend_Auth::getInstance()->getIdentity()); - $person = $result[0]; - $personID = $person["personID"]; - if (isset($personID)){ - $this->personmapper = new Application_Model_PersonMapper(); - $person = $this->personmapper->find($personID); - try { - $this->personmapper->delete($person); - }catch(Zend_Exception $e) - { - echo "Caught exception: " . get_class($e) . "<br/>"; - echo "Message: " . $e->getMessage() . "<br/>"; + if($_POST['confirmdelete']) { + $auth = Zend_Auth::getInstance(); + $result = $this->personmapper->findBy('email', $auth->getIdentity()); + $person = $result[0]; + $personID = $person["personID"]; + if (isset($personID)){ + $this->personmapper = new Application_Model_PersonMapper(); + $person = $this->personmapper->find($personID); + try { + $this->personmapper->delete($person); + }catch(Zend_Exception $e) + { + echo "Caught exception: " . get_class($e) . "<br/>"; + echo "Message: " . $e->getMessage() . "<br/>"; + return; + } + $auth->clearIdentity(); + Zend_Session::namespaceUnset('userIDs'); + Zend_Session::forgetMe(); + $this->_helper->redirector('login', 'auth'); return; } - $auth = Zend_Auth::getInstance(); - $auth->clearIdentity(); - $this->_helper->redirector('login', 'auth'); - return; + } else { + $deleteconfirmform = new user_Form_ConfirmDeleteAccount(); + $this->view->deleteconfirmform = $deleteconfirmform; } } |