summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorBjörn Geiger2011-08-04 14:23:17 +0200
committerBjörn Geiger2011-08-04 14:23:17 +0200
commita33d1acea771e80c5f5c84ff7dfeb7594d95522e (patch)
treec09e8a0cd55f2b1076e8f69fc2070170685de65b /application
parentSelectmembership nun auch über API (diff)
downloadpoolctrl-a33d1acea771e80c5f5c84ff7dfeb7594d95522e.tar.gz
poolctrl-a33d1acea771e80c5f5c84ff7dfeb7594d95522e.tar.xz
poolctrl-a33d1acea771e80c5f5c84ff7dfeb7594d95522e.zip
fehler korrigiert
Diffstat (limited to 'application')
-rw-r--r--application/controllers/AuthController.php7
-rw-r--r--application/controllers/PersonController.php6
2 files changed, 7 insertions, 6 deletions
diff --git a/application/controllers/AuthController.php b/application/controllers/AuthController.php
index c5cb46f..51232f0 100644
--- a/application/controllers/AuthController.php
+++ b/application/controllers/AuthController.php
@@ -51,15 +51,18 @@ class AuthController extends Zend_Controller_Action
$success = sprintf("%s", $login->success);
if ($success === "true") {
$personid = sprintf("%s", $login->personid);
- $membershipSession = new Zend_Session_Namespace('user');
+ $membershipSession = new Zend_Session_Namespace('memberships');
+ $count = 0;
foreach($login->membershiplist->membership as $membershipXML)
{
$membership['membershipID'] = sprintf("%s", $membershipXML->id);
$membership['personID'] = sprintf("%s", $membershipXML->personid);
$membership['groupID'] = sprintf("%s", $membershipXML->groupid);
$membership['apikey'] = sprintf("%s", $membershipXML->apikey);
- $membershipSession->memberships[] = $membership;
+ $membershipSession->$count = $membership;
+ $count++;
}
+
$this->personmapper = new Application_Model_PersonMapper();
$person = $this->personmapper->find($personid);
$person->setEmail($loginForm->getValue('email'));
diff --git a/application/controllers/PersonController.php b/application/controllers/PersonController.php
index 04a9bfc..d113d2f 100644
--- a/application/controllers/PersonController.php
+++ b/application/controllers/PersonController.php
@@ -36,9 +36,7 @@ class PersonController extends Zend_Controller_Action
$this->groupMapper = new Application_Model_GroupMapper();
$this->membershipMapper = new Application_Model_MembershipMapper();
- $membershipNamespace = Zend_Session::namespaceGet('user');
-
- $this->memberships = $membershipNamespace['memberships'];
+ $this->memberships = Zend_Session::namespaceGet('memberships');
$this->view->apikeys = array();
@@ -120,7 +118,7 @@ class PersonController extends Zend_Controller_Action
}
} else {
$poolNotifier = new Poolctrl_Notifier();
- $this->view->notification = $poolNotifier->notify("Currently you are not member of a group", 'error' );
+ $this->view->notification = $poolNotifier->notify("Currently you are not a member of any group", 'error' );
}
}
}