make facebook contacts honour the default group selection

This commit is contained in:
friendica 2012-05-18 19:04:58 -07:00
parent 2031a7240c
commit d2be106d13
2 changed files with 8 additions and 0 deletions

Binary file not shown.

View File

@ -332,6 +332,14 @@ function fb_get_friends_sync_parsecontact($uid, $contact) {
$contact_id = $r[0]['id']; $contact_id = $r[0]['id'];
$g = q("select def_gid from user where uid = %d limit 1",
intval($uid)
);
if($g && intval($g[0]['def_gid'])) {
require_once('include/group.php');
group_add_member($uid,'',$contact_id,$g[0]['def_gid']);
}
require_once("Photo.php"); require_once("Photo.php");
$photos = import_profile_photo($r[0]['photo'],$uid,$contact_id); $photos = import_profile_photo($r[0]['photo'],$uid,$contact_id);