summaryrefslogtreecommitdiff
path: root/app/Core/User/UserProperty.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Core/User/UserProperty.php')
-rw-r--r--app/Core/User/UserProperty.php6
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;
}
}