From 06cfaf4e0a9b521a151cc214dd217018f4c83389 Mon Sep 17 00:00:00 2001 From: Björn Geiger Date: Thu, 24 Mar 2011 13:47:33 +0100 Subject: PersonController im user Module --- .../modules/dev/controllers/PersonController.php | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'application/modules/dev/controllers/PersonController.php') diff --git a/application/modules/dev/controllers/PersonController.php b/application/modules/dev/controllers/PersonController.php index e422870..40e51af 100644 --- a/application/modules/dev/controllers/PersonController.php +++ b/application/modules/dev/controllers/PersonController.php @@ -90,11 +90,29 @@ class dev_PersonController extends Zend_Controller_Action foreach($allgroups as $group) { foreach($groupRequests as $groupRequest) { if($groupRequest['groupID'] == $group->getID()) { - unset($allgroups[$count]); + $groupsFound[$count] = true; + } else { + $groupsFound[$count] = false; + } + } + foreach($this->memberships as $membership) { + if($membership['groupID'] == $group->getID()) { + $groupsFound[$count] = true; + } else { + if($groupsFound[$count] != true) { + $groupsFound[$count] = false; + } } } $count++; } + if(count($groupsFound) > 0) { + foreach($groupsFound as $k => $v) { + if($v == true) { + unset($allgroups[$k]); + } + } + } if (!isset($_POST["request"])){ if(count($allgroups) <= 0) { echo "No Groups to choose."; -- cgit v1.2.3-55-g7522