function follow_post(App $a)
{
- if (!local_user()) {
+ if (!DI::userSession()->getLocalUserId()) {
throw new \Friendica\Network\HTTPException\ForbiddenException(DI::l10n()->t('Access denied.'));
}
{
$return_path = 'contact';
- if (!local_user()) {
+ if (!DI::userSession()->getLocalUserId()) {
DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.'));
DI::baseUrl()->redirect($return_path);
// NOTREACHED
}
- $uid = local_user();
+ $uid = DI::userSession()->getLocalUserId();
$url = Probe::cleanURI(trim($_REQUEST['url'] ?? ''));
function follow_remote_item($url)
{
- $item_id = Item::fetchByLink($url, local_user());
+ $item_id = Item::fetchByLink($url, DI::userSession()->getLocalUserId());
if (!$item_id) {
// If the user-specific search failed, we search and probe a public post
$item_id = Item::fetchByLink($url);