mirror of
https://github.com/friendica/friendica
synced 2025-04-26 15:10:11 +00:00
Use Model\Photo as much as possible
Most important is to use `Photo::delete()` to have backend to remove data.
This commit is contained in:
parent
d549787bc1
commit
8c75c26361
8 changed files with 39 additions and 56 deletions
|
@ -483,7 +483,7 @@ class Contact extends BaseObject
|
|||
'gender' => $profile['gender'], 'avatar' => $profile['photo'],
|
||||
'contact-type' => $user['account-type'], 'xmpp' => $profile['xmpp']];
|
||||
|
||||
$avatar = DBA::selectFirst('photo', ['resource-id', 'type'], ['uid' => $uid, 'profile' => true]);
|
||||
$avatar = Photo::selectFirst(['resource-id', 'type'], ['uid' => $uid, 'profile' => true]);
|
||||
if (DBA::isResult($avatar)) {
|
||||
if ($update_avatar) {
|
||||
$fields['avatar-date'] = DateTimeFormat::utcNow();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue