diff options
| author | Simon | 2011-04-19 20:43:38 +0200 |
|---|---|---|
| committer | Simon | 2011-04-19 20:43:38 +0200 |
| commit | 595642e66c75b519375414c9bf09195264419fe3 (patch) | |
| tree | 62b85883e4e9fa6d30614ae817d77f32061c58bc /application/modules/user/controllers/PersonController.php | |
| parent | debugmeldungen entfernt (diff) | |
| download | pbs2-595642e66c75b519375414c9bf09195264419fe3.tar.gz pbs2-595642e66c75b519375414c9bf09195264419fe3.tar.xz pbs2-595642e66c75b519375414c9bf09195264419fe3.zip | |
Ticket #227 - Wenn eine Person nur eine Membership hat, wird diese automatischa usgewählt
Diffstat (limited to 'application/modules/user/controllers/PersonController.php')
| -rw-r--r-- | application/modules/user/controllers/PersonController.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/application/modules/user/controllers/PersonController.php b/application/modules/user/controllers/PersonController.php index 52bf757..07a69ee 100644 --- a/application/modules/user/controllers/PersonController.php +++ b/application/modules/user/controllers/PersonController.php @@ -309,7 +309,15 @@ class user_PersonController extends Zend_Controller_Action if(isset($userIDsNamespace['membershipID'])) { $this->_redirect('/user/'); } else { - if(count($this->memberships) > 0) { + if(count($this->memberships) == 1) { + $myMembership = $this->memberships[0]; + $roleSession = new Zend_Session_Namespace('userIDs'); + $roleSession->membershipID = $myMembership['membershipID']; + $roleSession->personID = $myMembership['personID']; + $roleSession->groupID = $myMembership['groupID']; + $roleSession->roleID = $myMembership['roleID']; + $this->_redirect('/user/'); + } elseif(count($this->memberships) > 1) { if(isset($_POST['selectmembership'])) { $roleSession = new Zend_Session_Namespace('userIDs'); $roleSession->membershipID = $_POST['membershipID']; |
