summaryrefslogtreecommitdiffstats
path: root/application/modules
diff options
context:
space:
mode:
authormichael pereira2011-09-23 20:09:04 +0200
committermichael pereira2011-09-23 20:09:04 +0200
commitb70a9c8fae8c49d91673d94ce7340dea5c71d7f1 (patch)
tree7b7baec12827edd7e600908ac809173cbfc5aa8f /application/modules
parentpersonid (diff)
downloadpbs2-b70a9c8fae8c49d91673d94ce7340dea5c71d7f1.tar.gz
pbs2-b70a9c8fae8c49d91673d94ce7340dea5c71d7f1.tar.xz
pbs2-b70a9c8fae8c49d91673d94ce7340dea5c71d7f1.zip
personid
Diffstat (limited to 'application/modules')
-rw-r--r--application/modules/ipxe/controllers/ResourceController.php14
-rw-r--r--application/modules/ipxe/views/scripts/resource/getvesamenu.phtml6
2 files changed, 12 insertions, 8 deletions
diff --git a/application/modules/ipxe/controllers/ResourceController.php b/application/modules/ipxe/controllers/ResourceController.php
index 36a0c86..00b5f29 100644
--- a/application/modules/ipxe/controllers/ResourceController.php
+++ b/application/modules/ipxe/controllers/ResourceController.php
@@ -18,13 +18,6 @@ class Ipxe_ResourceController extends Zend_Controller_Action
public function init()
{
-
- $person = $this->_request->getParam('person');
- if (isset($person)) {
- $this->membershipMapper = new Application_Model_MembershipMapper();
- $this->memberships = $this->membershipMapper->findBy(array("personID" => $person),true);
- }
-
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender();
@@ -119,6 +112,13 @@ class Ipxe_ResourceController extends Zend_Controller_Action
$login = $this->_request->getParam('login') == 'true';
if($login){
+
+ $person = $this->_request->getParam('person');
+ if (isset($person)) {
+ $this->membershipMapper = new Application_Model_MembershipMapper();
+ $this->memberships = $this->membershipMapper->findBy(array("personID" => $person),true);
+ }
+ $this->memberships = null;
$groupMapper = new Application_Model_GroupMapper();
$roleMapper = new Application_Model_RoleMapper();
if(isset($this->memberships)) {
diff --git a/application/modules/ipxe/views/scripts/resource/getvesamenu.phtml b/application/modules/ipxe/views/scripts/resource/getvesamenu.phtml
index 7ad44ba..c9c835f 100644
--- a/application/modules/ipxe/views/scripts/resource/getvesamenu.phtml
+++ b/application/modules/ipxe/views/scripts/resource/getvesamenu.phtml
@@ -105,10 +105,14 @@ MENU MSGCOLOR #ff1c2a33 #00000000 none
title ( "Select Membership:" );
if(isset($this->memberships)){
foreach($this->memberships as $membership){
- uriboot ($membership['group'], 'test', 'test');
+ uriboot ($membership['group']." as ".$membership['role'], 'test', 'test');
}
+ }else{
+ label ("You have no memberships.");
+ uriboot ( "Return to Group Bootmenu", "/ipxe/auth/serial/serialnumber/55-44-33-22-11/mac/123/login/false", "" );
}
+
}