]> git.mxchange.org Git - friendica.git/blobdiff - mod/suggest.php
Merge pull request #12025 from annando/no-boot-src-module
[friendica.git] / mod / suggest.php
index 192f59d910af4792084126140f096dcf79e3363e..207a49e883580d3fe71b3eb349f8ba9e962778ea 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -22,6 +22,7 @@
 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;
@@ -30,7 +31,7 @@ use Friendica\Network\HTTPException;
 
 function suggest_content(App $a)
 {
-       if (!local_user()) {
+       if (!Session::getLocalUser()) {
                throw new HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.'));
        }
 
@@ -39,7 +40,7 @@ function suggest_content(App $a)
        DI::page()['aside'] .= Widget::findPeople();
        DI::page()['aside'] .= Widget::follow();
 
-       $contacts = Contact::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.');
        }