summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
Diffstat (limited to 'application')
-rw-r--r--application/modules/fbgui/controllers/IndexController.php6
-rw-r--r--application/modules/fbgui/controllers/PersonController.php12
-rw-r--r--application/modules/user/controllers/PersonController.php10
3 files changed, 25 insertions, 3 deletions
diff --git a/application/modules/fbgui/controllers/IndexController.php b/application/modules/fbgui/controllers/IndexController.php
index eb8a39d..17d9337 100644
--- a/application/modules/fbgui/controllers/IndexController.php
+++ b/application/modules/fbgui/controllers/IndexController.php
@@ -40,6 +40,12 @@ class Fbgui_IndexController extends Zend_Controller_Action
if(count($mySession->postdata)<=0){
$mySession->postdata = $_POST;
}
+
+ $result = $this->_request->getParam('notify');
+ if($result == 'nomember'){
+ $pbsNotifier = new Pbs_Notifier();
+ $this->view->notification = $pbsNotifier->notify('You have no membership, therefore you have no own BootMenu','info');
+ }
$d = new Pbs_Debug();
$d->debug(array('FBGuiIndexController',$_SERVER['REMOTE_ADDR'],implode("\t",$mySession->postdata)));
diff --git a/application/modules/fbgui/controllers/PersonController.php b/application/modules/fbgui/controllers/PersonController.php
index 7bb82aa..b884a28 100644
--- a/application/modules/fbgui/controllers/PersonController.php
+++ b/application/modules/fbgui/controllers/PersonController.php
@@ -42,7 +42,15 @@ class Fbgui_PersonController extends Zend_Controller_Action
if(isset($userIDsNamespace['membershipID'])) {
$this->_redirect('/fbgui/');
} 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('/fbgui/');
+ } elseif(count($this->memberships) > 1) {
if(isset($_POST['selectmembership'])) {
$roleSession = new Zend_Session_Namespace('userIDs');
$roleSession->membershipID = $_POST['membershipID'];
@@ -70,7 +78,7 @@ class Fbgui_PersonController extends Zend_Controller_Action
$this->view->membershipSelectForm = $membershipSelectForm;
}
} else {
- $this->_redirect('/fbgui/');
+ $this->_redirect('/fbgui/index/index/notify/nomember');
}
}
}
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'];