]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/Diaspora.php
Merge pull request #4100 from Rudloff/feature/composer
[friendica.git] / src / Protocol / Diaspora.php
index a56b1fe87759de314ca3ca32199a9833b65ec9cd..8828324c541feecf6310ba19ae6aa75d5f03d02f 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) {
@@ -4049,6 +4051,11 @@ class Diaspora
                        return;
                }
 
+               $owner = User::getOwnerDataById($uid);
+               if (!$owner) {
+                       return;
+               }
+
                if (!$recips) {
                        $recips = q(
                                "SELECT `id`,`name`,`network`,`pubkey`,`notify` FROM `contact` WHERE `network` = '%s'
@@ -4067,7 +4074,7 @@ class Diaspora
 
                foreach ($recips as $recip) {
                        logger("Send updated profile data for user ".$uid." to contact ".$recip["id"], LOGGER_DEBUG);
-                       self::buildAndTransmit($profile, $recip, "profile", $message, false, "", true);
+                       self::buildAndTransmit($owner, $recip, "profile", $message, false, "", true);
                }
        }