summaryrefslogtreecommitdiffstats
path: root/application/controllers/AuthController.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/controllers/AuthController.php')
-rwxr-xr-xapplication/controllers/AuthController.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/application/controllers/AuthController.php b/application/controllers/AuthController.php
index b3f6bbf..bac4855 100755
--- a/application/controllers/AuthController.php
+++ b/application/controllers/AuthController.php
@@ -46,20 +46,22 @@ class AuthController extends Zend_Controller_Action
$loginForm = new Application_Form_Login($_POST);
if ($loginForm->isValid($_POST)) {
$membershipSession = new Zend_Session_Namespace('memberships');
- if($this->pbs2Api->login($loginForm->getValue('email'), $loginForm->getValue('password'), $membershipSession)) {
+ $error = "";
+ $personID = "";
+ $apikey = "";
+ if($this->pbs2Api->login($loginForm->getValue('email'), $loginForm->getValue('password'), $membershipSession, $error, $personID, $apikey)) {
+ $membershipNamespace = $membershipSession->getIterator();
$personSession = new Zend_Session_Namespace('persons');
- $this->pbs2Api->getPerson($personSession);
+ $this->pbs2Api->getPerson($personSession, $apikey);
$userSession = new Zend_Session_Namespace('userIDs');
- $userSession->personID = sprintf("%s", $login->personid);
+ $userSession->personID = sprintf("%s", $personID);
$authSession = new Zend_Session_Namespace('auth');
$authSession->storage = $loginForm->getValue('email');
$this->_helper->redirector('selectmembership', 'person');
- return;
} else {
- $error = sprintf("%s", $login->error);
if($error == "wrong email or password") {
$poolctrlNotifier = new Poolctrl_Notifier();
$this->view->notification = $poolctrlNotifier->notify('Wrong Email or Password', 'error');