]> git.mxchange.org Git - friendica.git/blobdiff - include/items.php
Reworked "remote" cookie handling
[friendica.git] / include / items.php
index 25c857f1156a615a0efbbf914b0f815a37fb7fef..c5d8fc023d6558d7f3da77b2338522db16877a5b 100644 (file)
@@ -362,14 +362,8 @@ function drop_item($id, $return = '')
        $contact_id = 0;
 
        // check if logged in user is either the author or owner of this item
-
-       if (!empty($_SESSION['remote'])) {
-               foreach ($_SESSION['remote'] as $visitor) {
-                       if ($visitor['uid'] == $item['uid'] && $visitor['cid'] == $item['contact-id']) {
-                               $contact_id = $visitor['cid'];
-                               break;
-                       }
-               }
+       if (remote_user($item['uid']) == $item['contact-id']) {
+               $contact_id = $item['contact-id'];
        }
 
        if ((local_user() == $item['uid']) || $contact_id) {