X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fdfrn_confirm.php;h=112ee34ab3195bd906e0bd97cbfd5ff22a4f1b37;hb=63622966666729ba82fef8f12484e022500ff867;hp=c999013eff121007f427610591ea21b1b56f40d0;hpb=e437c74d0e4e4ece4693a2e32513c3ecde7efb4d;p=friendica.git diff --git a/mod/dfrn_confirm.php b/mod/dfrn_confirm.php index c999013eff..112ee34ab3 100644 --- a/mod/dfrn_confirm.php +++ b/mod/dfrn_confirm.php @@ -25,11 +25,12 @@ use Friendica\Core\System; use Friendica\Core\Worker; use Friendica\Database\DBM; use Friendica\Model\Contact; +use Friendica\Model\Group; +use Friendica\Model\User; use Friendica\Network\Probe; use Friendica\Protocol\Diaspora; require_once 'include/enotify.php'; -require_once 'include/group.php'; function dfrn_confirm_post(App $a, $handsfree = null) { @@ -502,13 +503,10 @@ function dfrn_confirm_post(App $a, $handsfree = null) { } } - $def_gid = get_default_group($uid, $contact["network"]); - if($contact && intval($def_gid)) - group_add_member($uid, '', $contact['id'], $def_gid); + Group::addMember(User::getDefaultGroup($uid, $contact["network"]), $contact['id']); // Let's send our user to the contact editor in case they want to // do anything special with this new friend. - if ($handsfree === null) { goaway(System::baseUrl() . '/contacts/' . intval($contact_id)); } else {