diff options
author | Frédéric Guillot <fred@kanboard.net> | 2017-11-28 16:29:49 -0800 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2017-11-28 16:29:49 -0800 |
commit | 6d2076e85940c38c3b00bc26ec932aae09712743 (patch) | |
tree | 6110681fad8649f52d9410c93ce371aeb9c4d808 /app | |
parent | 436673247fc28ae05c6b17baf202ca26e1903862 (diff) |
Add config option to exclude fields from auth providers sync
Diffstat (limited to 'app')
-rw-r--r-- | app/Core/User/UserProperty.php | 2 | ||||
-rw-r--r-- | app/constants.php | 3 |
2 files changed, 4 insertions, 1 deletions
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'); |