]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Home.php
Merge pull request #12025 from annando/no-boot-src-module
[friendica.git] / src / Module / Home.php
index 21d92676cc1c5704e457802bff731cbf12e68a78..87de58a15d5d34c4be1777ad13077d2e6af271c9 100644 (file)
@@ -1,6 +1,6 @@
 <?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
  *
@@ -24,6 +24,7 @@ namespace Friendica\Module;
 use Friendica\BaseModule;
 use Friendica\Core\Hook;
 use Friendica\Core\Renderer;
+use Friendica\Core\Session;
 use Friendica\DI;
 use Friendica\Module\Security\Login;
 
@@ -32,7 +33,7 @@ use Friendica\Module\Security\Login;
  */
 class Home extends BaseModule
 {
-       public static function content(array $parameters = [])
+       protected function content(array $request = []): string
        {
                $app = DI::app();
                $config = DI::config();
@@ -42,7 +43,7 @@ class Home extends BaseModule
 
                Hook::callAll('home_init', $ret);
 
-               if (local_user() && ($app->user['nickname'])) {
+               if (Session::getLocalUser() && ($app->getLoggedInUserNickname())) {
                        DI::baseUrl()->redirect('network');
                }