]> git.mxchange.org Git - friendica.git/commitdiff
Fix Protocol\Diaspora missing user variable
authorHypolite Petovan <mrpetovan@gmail.com>
Sun, 17 Dec 2017 21:08:22 +0000 (16:08 -0500)
committerHypolite Petovan <mrpetovan@gmail.com>
Sun, 17 Dec 2017 21:08:22 +0000 (16:08 -0500)
src/Protocol/Diaspora.php

index 466104c40429ba4f9be03de5c826216420db74a0..5bfebe9f749216f59222092593c240e33314f3e1 100644 (file)
@@ -2316,10 +2316,12 @@ class Diaspora
 
                                $arr["last-child"] = 1;
 
-                               $arr["allow_cid"] = $self[0]["allow_cid"];
-                               $arr["allow_gid"] = $self[0]["allow_gid"];
-                               $arr["deny_cid"]  = $self[0]["deny_cid"];
-                               $arr["deny_gid"]  = $self[0]["deny_gid"];
+                               $user = dba::select('user', ['allow_cid', 'allow_gid', 'deny_cid', 'deny_gid'], ['uid' => $importer["uid"]], ['limit' => 1]);
+
+                               $arr["allow_cid"] = $user["allow_cid"];
+                               $arr["allow_gid"] = $user["allow_gid"];
+                               $arr["deny_cid"]  = $user["deny_cid"];
+                               $arr["deny_gid"]  = $user["deny_gid"];
 
                                $i = item_store($arr);
                                if ($i) {