- } elseif ($remote_user) {
- $cid = \Friendica\Core\Session::getVisitorContactIDForUserID($owner_id);
-
- /*
- * Authenticated visitor. Unless pre-verified,
- * check that the contact belongs to this $owner_id
- * and load the groups the visitor belongs to.
- * If pre-verified, the caller is expected to have already
- * done this and passed the groups into this function.
- */
-
- if (!$remote_verified) {
- if ($cid && DBA::exists('contact', ['id' => $cid, 'uid' => $owner_id, 'blocked' => false])) {
- $remote_verified = true;
- $groups = Group::getIdsByContactId($cid);
- }
- }