From e4a63bc219274a128ea4d6fe0a61456e8e01d183 Mon Sep 17 00:00:00 2001 From: Philipp Holzer Date: Thu, 30 May 2019 10:18:52 +0200 Subject: [PATCH] Replace $_SESSION with Session::get() --- mod/redir.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mod/redir.php b/mod/redir.php index 931e07c770..0e93a63fc2 100644 --- a/mod/redir.php +++ b/mod/redir.php @@ -3,6 +3,7 @@ use Friendica\App; use Friendica\Core\L10n; use Friendica\Core\Logger; +use Friendica\Core\Session; use Friendica\Core\System; use Friendica\Database\DBA; use Friendica\Model\Contact; @@ -70,10 +71,9 @@ function redir_init(App $a) { && is_array($_SESSION['remote'])) { foreach ($_SESSION['remote'] as $v) { - if (!empty($v['uid']) && !empty($_SESSION['visitor_visiting']) && - !empty($v['cid']) && !empty($_SESSION['visitor_id']) && - $v['uid'] == $_SESSION['visitor_visiting'] && - $v['cid'] == $_SESSION['visitor_id']) { + if (!empty($v['uid']) && !empty($v['cid']) && + $v['uid'] === Session::get('visitor_visiting') && + $v['cid'] === Session::get('visitor_id')) { // Remote user is already authenticated. $target_url = defaults($url, $contact_url); Logger::log($contact['name'] . " is already authenticated. Redirecting to " . $target_url, Logger::DEBUG); -- 2.39.5