<?php
/**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
use Friendica\App;
use Friendica\Content\Widget;
use Friendica\Core\Renderer;
+use Friendica\Core\Session;
use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Model\Contact;
function suggest_content(App $a)
{
- if (!local_user()) {
+ if (!Session::getLocalUser()) {
throw new HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.'));
}
DI::page()['aside'] .= Widget::findPeople();
DI::page()['aside'] .= Widget::follow();
- $contacts = Contact\Relation::getSuggestions(local_user());
+ $contacts = Contact\Relation::getSuggestions(Session::getLocalUser());
if (!DBA::isResult($contacts)) {
return DI::l10n()->t('No suggestions available. If this is a new site, please try again in 24 hours.');
}