UserSession class [2] - Refactor mod/ files

This commit is contained in:
Philipp
2022-10-20 21:02:49 +02:00
parent a729f3255d
commit bfe68702db
25 changed files with 201 additions and 201 deletions

View File

@@ -31,7 +31,7 @@ use Friendica\Network\HTTPException;
function suggest_content(App $a)
{
if (!Session::getLocalUser()) {
if (!DI::userSession()->getLocalUserId()) {
throw new HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.'));
}
@@ -40,7 +40,7 @@ function suggest_content(App $a)
DI::page()['aside'] .= Widget::findPeople();
DI::page()['aside'] .= Widget::follow();
$contacts = Contact\Relation::getSuggestions(Session::getLocalUser());
$contacts = Contact\Relation::getSuggestions(DI::userSession()->getLocalUserId());
if (!DBA::isResult($contacts)) {
return DI::l10n()->t('No suggestions available. If this is a new site, please try again in 24 hours.');
}