From a0583c8308d8f56d8b74d2f9fdc52be97f6bb8df Mon Sep 17 00:00:00 2001
From: Jaime Perez <jaime.perez@uninett.no>
Date: Tue, 12 Aug 2014 14:32:30 +0200
Subject: [PATCH] aselect: remove check for nonexistent 'res' index in A-Select
 server's response. Look for 'uid' and 'organization' directly in the response
 array.

---
 modules/aselect/www/credentials.php | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/modules/aselect/www/credentials.php b/modules/aselect/www/credentials.php
index 2a17c4286..09b4b0657 100644
--- a/modules/aselect/www/credentials.php
+++ b/modules/aselect/www/credentials.php
@@ -49,8 +49,7 @@ try {
     if (array_key_exists('attributes', $creds)) {
         $state['Attributes'] = $creds['attributes'];
     } else {
-        $res = $creds['res'];
-        $state['Attributes'] = array('uid' => array($res['uid']), 'organization' => array($res['organization']));
+        $state['Attributes'] = array('uid' => array($creds['uid']), 'organization' => array($creds['organization']));
     }
 } catch (Exception $e) {
     SimpleSAML_Auth_State::throwException($state, $e);
-- 
GitLab