*/
function match_content(App $a)
{
- if (!local_user()) {
+ if (!DI::userSession()->getLocalUserId()) {
return '';
}
$_SESSION['return_path'] = DI::args()->getCommand();
- $profile = Profile::getByUID(local_user());
+ $profile = Profile::getByUID(DI::userSession()->getLocalUserId());
if (!DBA::isResult($profile)) {
return '';
$tags = trim($profile['pub_keywords'] . ' ' . $profile['prv_keywords']);
if (DI::mode()->isMobile()) {
- $limit = DI::pConfig()->get(local_user(), 'system', 'itemspage_mobile_network',
+ $limit = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'itemspage_mobile_network',
DI::config()->get('system', 'itemspage_network_mobile'));
} else {
- $limit = DI::pConfig()->get(local_user(), 'system', 'itemspage_network',
+ $limit = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'itemspage_network',
DI::config()->get('system', 'itemspage_network'));
}
DI::sysmsg()->addInfo(DI::l10n()->t('No matches'));
}
- $tpl = Renderer::getMarkupTemplate('viewcontact_template.tpl');
+ $tpl = Renderer::getMarkupTemplate('contact/list.tpl');
$o = Renderer::replaceMacros($tpl, [
'$title' => DI::l10n()->t('Profile Match'),
'$contacts' => array_slice($entries, 0, $limit),
}
// Already known contact
- $contact = Contact::getByURL($profile->url, null, ['rel'], local_user());
+ $contact = Contact::getByURL($profile->url, null, ['rel'], DI::userSession()->getLocalUserId());
if (!empty($contact) && in_array($contact['rel'], [Contact::FRIEND, Contact::SHARING])) {
continue;
}
- $contact = Contact::getByURLForUser($profile->url, local_user());
+ $contact = Contact::getByURLForUser($profile->url, DI::userSession()->getLocalUserId());
if (!empty($contact)) {
$entries[$contact['id']] = ModuleContact::getContactTemplateVars($contact);
}