}
$fields = ['id', 'uid', 'nurl', 'url', 'addr', 'name'];
- $contact = DBA::selectFirst('contact', $fields, ['id' => $cid, 'uid' => [0, local_user()]]);
+ $contact = DBA::selectFirst('contact', $fields, ['id' => $cid, 'uid' => [0, Session::getLocalUser()]]);
if (!DBA::isResult($contact)) {
throw new \Friendica\Network\HTTPException\NotFoundException(DI::l10n()->t('Contact not found.'));
}
$a->redirect($url ?: $contact_url);
}
- if ($contact['uid'] == 0 && local_user()) {
+ if ($contact['uid'] == 0 && Session::getLocalUser()) {
// Let's have a look if there is an established connection
// between the public contact we have found and the local user.
- $contact = DBA::selectFirst('contact', $fields, ['nurl' => $contact['nurl'], 'uid' => local_user()]);
+ $contact = DBA::selectFirst('contact', $fields, ['nurl' => $contact['nurl'], 'uid' => Session::getLocalUser()]);
if (DBA::isResult($contact)) {
$cid = $contact['id'];
}
}
- if (remote_user()) {
+ if (Session::getRemoteUser()) {
$host = substr(DI::baseUrl()->getUrlPath() . (DI::baseUrl()->getUrlPath() ? '/' . DI::baseUrl()->getUrlPath() : ''), strpos(DI::baseUrl()->getUrlPath(), '://') + 3);
$remotehost = substr($contact['addr'], strpos($contact['addr'], '@') + 1);