diff --git a/protected/humhub/modules/user/authclient/AuthClientHelpers.php b/protected/humhub/modules/user/authclient/AuthClientHelpers.php index fc7c8fb412..b89019d6cf 100644 --- a/protected/humhub/modules/user/authclient/AuthClientHelpers.php +++ b/protected/humhub/modules/user/authclient/AuthClientHelpers.php @@ -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; } }