summaryrefslogtreecommitdiffstats
path: root/application/modules/user/controllers/AuthController.php
diff options
context:
space:
mode:
authormichael pereira2011-03-29 11:01:35 +0200
committermichael pereira2011-03-29 11:01:35 +0200
commitecb5c8d8c31ad70bb24e0ea1cfb6110bcd0a96bb (patch)
tree4b40a4178c2dc3bd3fe21730a29dd07bb8742790 /application/modules/user/controllers/AuthController.php
parentPreboot User Controller fertig, ACL fehlt noch (diff)
parentselectmembership von auth zu person verschoben fbgui module (diff)
downloadpbs2-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.php41
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;
}
}