Use the general function ro create an avatar path
This commit is contained in:
parent
98803064eb
commit
9f19adf8bb
|
@ -31,6 +31,7 @@ use Friendica\Model\Contact;
|
||||||
use Friendica\Model\Notification;
|
use Friendica\Model\Notification;
|
||||||
use Friendica\Model\User;
|
use Friendica\Model\User;
|
||||||
use Friendica\Network\HTTPException\ForbiddenException;
|
use Friendica\Network\HTTPException\ForbiddenException;
|
||||||
|
use Friendica\Util\Proxy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Switches current user between delegates/parent user
|
* Switches current user between delegates/parent user
|
||||||
|
@ -122,12 +123,12 @@ class Delegation extends BaseModule
|
||||||
|
|
||||||
//getting additinal information for each identity
|
//getting additinal information for each identity
|
||||||
foreach ($identities as $key => $identity) {
|
foreach ($identities as $key => $identity) {
|
||||||
$thumb = Contact::selectFirst(['thumb'], ['uid' => $identity['uid'], 'self' => true]);
|
$self = Contact::selectFirst(['id', 'updated'], ['uid' => $identity['uid'], 'self' => true]);
|
||||||
if (!DBA::isResult($thumb)) {
|
if (!DBA::isResult($self)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$identities[$key]['thumb'] = $thumb['thumb'];
|
$identities[$key]['thumb'] = Contact::getAvatarUrlForId($self['id'], Proxy::SIZE_THUMB, $self['updated']);
|
||||||
|
|
||||||
$identities[$key]['selected'] = ($identity['nickname'] === DI::app()->user['nickname']);
|
$identities[$key]['selected'] = ($identity['nickname'] === DI::app()->user['nickname']);
|
||||||
|
|
||||||
|
|
|
@ -2220,7 +2220,7 @@ class Probe
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $profile['name'], 'nick' => $profile['nick'], 'guid' => $approfile['diaspora:guid'] ?? '',
|
'name' => $profile['name'], 'nick' => $profile['nick'], 'guid' => $approfile['diaspora:guid'] ?? '',
|
||||||
'url' => $profile['url'], 'addr' => $profile['addr'], 'alias' => $profile['alias'],
|
'url' => $profile['url'], 'addr' => $profile['addr'], 'alias' => $profile['alias'],
|
||||||
'photo' => Contact::getAvatarUrlForId($profile['id'], $profile['updated']),
|
'photo' => Contact::getAvatarUrlForId($profile['id'], '', $profile['updated']),
|
||||||
'header' => $profile['header'] ? Contact::getHeaderUrlForId($profile['id'], $profile['updated']) : '',
|
'header' => $profile['header'] ? Contact::getHeaderUrlForId($profile['id'], $profile['updated']) : '',
|
||||||
'account-type' => $profile['contact-type'], 'community' => ($profile['contact-type'] == User::ACCOUNT_TYPE_COMMUNITY),
|
'account-type' => $profile['contact-type'], 'community' => ($profile['contact-type'] == User::ACCOUNT_TYPE_COMMUNITY),
|
||||||
'keywords' => $profile['keywords'], 'location' => $profile['location'], 'about' => $profile['about'],
|
'keywords' => $profile['keywords'], 'location' => $profile['location'], 'about' => $profile['about'],
|
||||||
|
|
Loading…
Reference in a new issue