New function to store the "remote" session value / making the changes work

This commit is contained in:
Michael 2019-09-26 04:47:42 +00:00
parent ec66553032
commit 704cdf1b5a
5 changed files with 33 additions and 41 deletions

View file

@ -110,14 +110,7 @@ class Security extends BaseObject
*/
if (!$remote_verified) {
$cid = 0;
foreach (\Friendica\Core\Session::get('remote', []) as $visitor) {
if ($visitor['uid'] == $owner_id) {
$cid = $visitor['cid'];
break;
}
}
$cid = \Friendica\Core\Session::getVisitorContactIDForUserID($owner_id);
if ($cid && DBA::exists('contact', ['id' => $cid, 'uid' => $owner_id, 'blocked' => false])) {
$remote_verified = true;