<?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\BaseModule;
use Friendica\Core\Hook;
use Friendica\Core\Renderer;
+use Friendica\Core\Session;
use Friendica\DI;
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();
Hook::callAll('home_init', $ret);
- if (local_user() && ($app->user['nickname'])) {
+ if (Session::getLocalUser() && ($app->getLoggedInUserNickname())) {
DI::baseUrl()->redirect('network');
}