diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-05-07 10:36:46 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-05-07 10:36:46 -0400 |
commit | 94989663eca0d0dc2e9adb6d3190f0ab3cca9d2a (patch) | |
tree | 3a3e529a34ccf0a8b6de623962a2319446c0f651 /app | |
parent | 400e230881bc71e052ee41da660ec5ff8dd3130d (diff) |
User roles are now synced with LDAP at each login
Diffstat (limited to 'app')
-rw-r--r-- | app/Core/User/UserProperty.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/Core/User/UserProperty.php b/app/Core/User/UserProperty.php index f8b08a3d..348bd7f3 100644 --- a/app/Core/User/UserProperty.php +++ b/app/Core/User/UserProperty.php @@ -44,10 +44,14 @@ class UserProperty */ public static function filterProperties(array $profile, array $properties) { + $excludedProperties = array('username'); $values = array(); foreach ($properties as $property => $value) { - if (array_key_exists($property, $profile) && ! self::isNotEmptyValue($profile[$property])) { + if (self::isNotEmptyValue($value) && + ! in_array($property, $excludedProperties) && + array_key_exists($property, $profile) && + $value !== $profile[$property]) { $values[$property] = $value; } } |