mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-09 18:08:49 +00:00
Use new Model methods for group
This commit is contained in:
parent
95facaefc7
commit
2dc299ff17
3 changed files with 9 additions and 21 deletions
|
@ -49,7 +49,9 @@ use Friendica\App;
|
|||
use Friendica\Core\Config;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Model\GContact;
|
||||
use Friendica\Model\Group;
|
||||
use Friendica\Model\Photo;
|
||||
use Friendica\Model\User;
|
||||
|
||||
class StatusNetOAuth extends TwitterOAuth
|
||||
{
|
||||
|
@ -1054,14 +1056,8 @@ function statusnet_fetch_contact($uid, $contact, $create_user)
|
|||
|
||||
$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']);
|
||||
}
|
||||
Group::addMember(User::getDefaultGroup($uid), $contact_id);
|
||||
|
||||
$photos = Photo::importProfilePhoto($contact->profile_image_url, $uid, $contact_id);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue