Fixed: Improved LDAP empty attribute handling

This commit is contained in:
Lucas Bartholemy 2016-07-29 14:09:02 +02:00
parent 537da2bdb5
commit 0547c25cad

View File

@ -127,6 +127,8 @@ class AuthClientHelpers
} else {
$user->profile->setAttribute($attributeName, $attributes[$attributeName]);
}
} else {
$user->profile->setAttribute($attributeName, '');
}
}
@ -136,7 +138,7 @@ class AuthClientHelpers
}
if (count($user->profile->getDirtyAttributes()) !== 0 && !$user->profile->save()) {
Yii::error('Could not update user attributes by AuthClient (UserId: ' . $user->id . ") - Error: " . print_r($user->getErrors(), 1));
Yii::error('Could not update user attributes by AuthClient (UserId: ' . $user->id . ") - Error: " . print_r($user->profile->getErrors(), 1));
return false;
}
}