From 94989663eca0d0dc2e9adb6d3190f0ab3cca9d2a Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 7 May 2016 10:36:46 -0400 Subject: User roles are now synced with LDAP at each login --- app/Core/User/UserProperty.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app/Core/User') 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; } } -- cgit v1.2.3