From 5921f6974d344cd931b331a90241a38a51798b37 Mon Sep 17 00:00:00 2001 From: Jan Eberhardt Date: Thu, 29 Jan 2015 16:45:34 +0000 Subject: [PATCH] MDL-31578 auth_shibboleth: Custom fields added to shibboleth settings Since LDAP is able to sync custom user profile fields, this feature was requested for Shibboleth. --- auth/shibboleth/auth.php | 3 ++- auth/shibboleth/config.html | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/auth/shibboleth/auth.php b/auth/shibboleth/auth.php index 02b3529ef3d..ddfe96f6e3c 100644 --- a/auth/shibboleth/auth.php +++ b/auth/shibboleth/auth.php @@ -143,7 +143,8 @@ class auth_plugin_shibboleth extends auth_plugin_base { $configarray = (array) $this->config; $moodleattributes = array(); - foreach ($this->userfields as $field) { + $userfields = array_merge($this->userfields, $this->get_custom_user_profile_fields()); + foreach ($userfields as $field) { if (isset($configarray["field_map_$field"])) { $moodleattributes[$field] = $configarray["field_map_$field"]; } diff --git a/auth/shibboleth/config.html b/auth/shibboleth/config.html index 9a1854f2e67..101be915e0b 100644 --- a/auth/shibboleth/config.html +++ b/auth/shibboleth/config.html @@ -138,7 +138,7 @@ urn:mace:organization2:providerID, Example Organization 2, /Shibboleth.sso/WAYF/ authtype, $user_fields, '', true, false); +print_auth_lock_options($this->authtype, $user_fields, '', true, false, $this->get_custom_user_profile_fields()); ?>