Bugfix: "default_group" behaviour wasn't implemented correctly

This commit is contained in:
Michael Vogel 2016-04-13 22:21:23 +02:00
parent a7d6fa1bc9
commit d6a79abb68
5 changed files with 17 additions and 23 deletions

View file

@ -1819,12 +1819,10 @@ class diaspora {
return;
}
$g = q("SELECT `def_gid` FROM `user` WHERE `uid` = %d LIMIT 1",
intval($importer["uid"])
);
$def_gid = get_default_group($importer['uid'], $ret["network"]);
if($g && intval($g[0]["def_gid"]))
group_add_member($importer["uid"], "", $contact_record["id"], $g[0]["def_gid"]);
if(intval($def_gid))
group_add_member($importer["uid"], "", $contact_record["id"], $def_gid);
if($importer["page-flags"] == PAGE_NORMAL) {