]> git.mxchange.org Git - friendica.git/blobdiff - src/App/Page.php
Merge pull request #10586 from annando/app-user2
[friendica.git] / src / App / Page.php
index 8a1ec47d55edfc19caeb0726e16db5aa5ab60bcb..766dd4ebef59dc4fa9ed1a59656778bf5e8480ed 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -277,8 +277,8 @@ class Page implements ArrayAccess
                // If you're just visiting, let javascript take you home
                if (!empty($_SESSION['visitor_home'])) {
                        $homebase = $_SESSION['visitor_home'];
-               } elseif (!empty($app->user['nickname'])) {
-                       $homebase = 'profile/' . $app->user['nickname'];
+               } elseif (!empty($app->getLoggedInUserNickname())) {
+                       $homebase = 'profile/' . $app->getLoggedInUserNickname();
                }
 
                if (isset($homebase)) {
@@ -459,7 +459,6 @@ class Page implements ArrayAccess
                }
 
                $page    = $this->page;
-               $profile = $app->profile;
 
                header("X-Friendica-Version: " . FRIENDICA_VERSION);
                header("Content-type: text/html; charset=utf-8");