From 6d2076e85940c38c3b00bc26ec932aae09712743 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Tue, 28 Nov 2017 16:29:49 -0800 Subject: Add config option to exclude fields from auth providers sync --- app/Core/User/UserProperty.php | 2 +- app/constants.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'app') diff --git a/app/Core/User/UserProperty.php b/app/Core/User/UserProperty.php index 348bd7f3..685690c2 100644 --- a/app/Core/User/UserProperty.php +++ b/app/Core/User/UserProperty.php @@ -44,7 +44,7 @@ class UserProperty */ public static function filterProperties(array $profile, array $properties) { - $excludedProperties = array('username'); + $excludedProperties = explode_csv_field(EXTERNAL_AUTH_EXCLUDE_FIELDS); $values = array(); foreach ($properties as $property => $value) { diff --git a/app/constants.php b/app/constants.php index ccd9167d..591d433a 100644 --- a/app/constants.php +++ b/app/constants.php @@ -149,3 +149,6 @@ defined('HTTP_VERIFY_SSL_CERTIFICATE') or define('HTTP_VERIFY_SSL_CERTIFICATE', defined('TOTP_ISSUER') or define('TOTP_ISSUER', 'Kanboard'); defined('PROJECT_ACTIVITIES_MAX_EVENTS') or define('PROJECT_ACTIVITIES_MAX_EVENTS', 10000); + +// Comma separated list of fields to not synchronize when using external authentication providers +defined('EXTERNAL_AUTH_EXCLUDE_FIELDS') or define('EXTERNAL_AUTH_EXCLUDE_FIELDS', 'username'); -- cgit v1.2.3