mirror of
https://github.com/friendica/friendica
synced 2025-04-24 19:10:11 +00:00
Use new Model methods for groups
This commit is contained in:
parent
fe89e7760e
commit
abdecd2b2f
17 changed files with 65 additions and 63 deletions
|
@ -16,6 +16,8 @@ use Friendica\Core\PConfig;
|
|||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\Group;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Network\Probe;
|
||||
|
||||
require_once 'include/enotify.php';
|
||||
|
@ -190,9 +192,7 @@ function dfrn_request_post(App $a) {
|
|||
$parms['key'] // this was already escaped
|
||||
);
|
||||
if (DBM::is_result($r)) {
|
||||
$def_gid = get_default_group(local_user(), $r[0]["network"]);
|
||||
if(intval($def_gid))
|
||||
group_add_member(local_user(), '', $r[0]['id'], $def_gid);
|
||||
Group::addMember(User::getDefaultGroup($uid, $r[0]["network"]), $r[0]['id']);
|
||||
|
||||
if (isset($photo)) {
|
||||
Contact::updateAvatar($photo, local_user(), $r[0]["id"], true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue