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 90e90d8..1c934d6 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;
                                        }
                                }