From: Hypolite Petovan Date: Wed, 2 Aug 2023 14:58:14 +0000 (+0200) Subject: Fix reference to username field in Contact::updateSelfFromUserID X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ecfbf317ae2ba703d31a58ee945eb4923527b33e;p=friendica.git Fix reference to username field in Contact::updateSelfFromUserID - Profile isn't updated with the display name in the account settings --- diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 3ca84515a9..17be0b0cfd 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -799,7 +799,7 @@ class Contact return false; } - $fields = ['uid', 'nickname', 'page-flags', 'account-type', 'prvkey', 'pubkey']; + $fields = ['uid', 'username', 'nickname', 'page-flags', 'account-type', 'prvkey', 'pubkey']; $user = DBA::selectFirst('user', $fields, ['uid' => $uid, 'account_expired' => false]); if (!DBA::isResult($user)) { return false; @@ -818,7 +818,7 @@ class Contact $url = DI::baseUrl() . '/profile/' . $user['nickname']; $fields = [ - 'name' => $profile['name'], + 'name' => $user['username'], 'nick' => $user['nickname'], 'avatar-date' => $self['avatar-date'], 'location' => Profile::formatLocation($profile), @@ -841,7 +841,6 @@ class Contact 'confirm' => DI::baseUrl() . '/dfrn_confirm/' . $user['nickname'], ]; - $avatar = Photo::selectFirst(['resource-id', 'type'], ['uid' => $uid, 'profile' => true]); if (DBA::isResult($avatar)) { if ($update_avatar) {