From a8b3a2624bb87b8e03e13f29857a51dfefedd399 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 17 Dec 2017 16:08:22 -0500 Subject: [PATCH] Fix Protocol\Diaspora missing user variable --- src/Protocol/Diaspora.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php index 466104c404..5bfebe9f74 100644 --- a/src/Protocol/Diaspora.php +++ b/src/Protocol/Diaspora.php @@ -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) { -- 2.39.5