From d0d6151ddffd2c4c8786c263680cb4194c07b4d5 Mon Sep 17 00:00:00 2001 From: Olav Morken <olav.morken@uninett.no> Date: Thu, 24 Oct 2013 10:39:58 +0000 Subject: [PATCH] negotiate: Add support for "attributes"-parameter. Thanks to Martin van Es for providing this patch! git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@3282 44740490-163a-0410-bde0-09ae8108e29a --- modules/negotiate/lib/Auth/Source/Negotiate.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/negotiate/lib/Auth/Source/Negotiate.php b/modules/negotiate/lib/Auth/Source/Negotiate.php index d2f49792b..173114cf1 100644 --- a/modules/negotiate/lib/Auth/Source/Negotiate.php +++ b/modules/negotiate/lib/Auth/Source/Negotiate.php @@ -47,6 +47,7 @@ class sspmod_negotiate_Auth_Source_Negotiate extends SimpleSAML_Auth_Source { $this->subnet = $config->getArray('subnet', NULL); $this->admin_user = $config->getString('adminUser', NULL); $this->admin_pw = $config->getString('adminPassword', NULL); + $this->attributes = $config->getArray('attributes', NULL); } @@ -268,7 +269,7 @@ click <a href="'.htmlspecialchars($url).'">here</a>. $this->adminBind(); try { $dn = $this->ldap->searchfordn($this->base, $this->attr, $uid); - return $this->ldap->getAttributes($dn); + return $this->ldap->getAttributes($dn, $this->attributes); } catch (SimpleSAML_Error_Exception $e) { SimpleSAML_Logger::debug('Negotiate - ldap lookup failed: '. $e); return NULL; -- GitLab