Merge pull request #4205 from MrPetovan/bug/4200-fix-contact-selectfirst
Fix selectFirst usage in Model\Contact
This commit is contained in:
commit
10b4171b36
|
@ -1246,15 +1246,13 @@ class Contact extends BaseObject
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$r = dba::selectFirst('contact', ['url' => $ret['url'], 'network' => $ret['network'], 'uid' => $uid]);
|
$contact = dba::selectFirst('contact', [], ['url' => $ret['url'], 'network' => $ret['network'], 'uid' => $uid]);
|
||||||
|
if (!DBM::is_result($contact)) {
|
||||||
if (!DBM::is_result($r)) {
|
|
||||||
$result['message'] .= t('Unable to retrieve contact information.') . EOL;
|
$result['message'] .= t('Unable to retrieve contact information.') . EOL;
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
$contact = $r;
|
$contact_id = $contact['id'];
|
||||||
$contact_id = $r['id'];
|
|
||||||
$result['cid'] = $contact_id;
|
$result['cid'] = $contact_id;
|
||||||
|
|
||||||
Group::addMember(User::getDefaultGroup($uid, $contact["network"]), $contact_id);
|
Group::addMember(User::getDefaultGroup($uid, $contact["network"]), $contact_id);
|
||||||
|
|
Loading…
Reference in a new issue