]> git.mxchange.org Git - friendica.git/commitdiff
Use accessing function for session variable
authorDean Townsley <dean@townsley.com>
Sun, 9 Jun 2019 01:24:51 +0000 (20:24 -0500)
committerDean Townsley <dean@townsley.com>
Mon, 10 Jun 2019 02:06:42 +0000 (21:06 -0500)
src/Util/Security.php

index 90e90d85089e0c0424f78013a4ad200cb17c8398..1c934d6fe617c741d9d6b47316570ea2ebe7b74b 100644 (file)
@@ -122,12 +122,10 @@ class Security extends BaseObject
                        if (!$remote_verified) {
                                $cid = 0;
 
-                               if (!empty($_SESSION['remote'])) {
-                                       foreach ($_SESSION['remote'] as $visitor) {
-                                               if ($visitor['uid'] == $owner_id) {
-                                                       $cid = $visitor['cid'];
-                                                       break;
-                                               }
+                               foreach (\Friendica\Core\Session::get('remote', []) as $visitor) {
+                                       if ($visitor['uid'] == $owner_id) {
+                                               $cid = $visitor['cid'];
+                                               break;
                                        }
                                }