diff options
| author | Simon | 2011-04-05 14:08:05 +0200 |
|---|---|---|
| committer | Simon | 2011-04-05 14:08:05 +0200 |
| commit | ddd0f90d170e6358c99f2557e2a5ac6ac5a89dce (patch) | |
| tree | 59b447db026037d9dff2e17275eb0679d7ed1f90 /application/modules/user/controllers/AuthController.php | |
| parent | fehler in suche gefixxt (diff) | |
| parent | Merge branch 'master' of ssh://git.openslx.org/lsfks/master-teamprojekt/pbs2 (diff) | |
| download | pbs2-ddd0f90d170e6358c99f2557e2a5ac6ac5a89dce.tar.gz pbs2-ddd0f90d170e6358c99f2557e2a5ac6ac5a89dce.tar.xz pbs2-ddd0f90d170e6358c99f2557e2a5ac6ac5a89dce.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 | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/application/modules/user/controllers/AuthController.php b/application/modules/user/controllers/AuthController.php index 7eccc98..8160104 100644 --- a/application/modules/user/controllers/AuthController.php +++ b/application/modules/user/controllers/AuthController.php @@ -2,9 +2,7 @@ class User_AuthController extends Zend_Controller_Action { - protected $personmapper = null; - private $db = null; public function init() @@ -120,11 +118,19 @@ class User_AuthController extends Zend_Controller_Action public function deleteAction() { + if($this->_request->getParam('personID')) { + if(!Pbs_Acl::checkRight('peoa')) { + $this->_redirect('/user'); + } + $personID = $this->_request->getParam('personID'); + } else { + if(!Pbs_Acl::checkRight('pdo')) { + $this->_redirect('/user'); + } + $userIDsNamespace = Zend_Session::namespaceGet('userIDs'); + $personID = $userIDsNamespace['personID']; + } if($_POST['confirmdelete']) { - $auth = Zend_Auth::getInstance(); - $result = $this->personmapper->findBy(array('email' => $auth->getIdentity()),true); - $person = $result[0]; - $personID = $person["personID"]; if (isset($personID)){ $this->personmapper = new Application_Model_PersonMapper(); $person = $this->personmapper->find($personID); |
