Automatically subscribe to the followings of a given AP account

This commit is contained in:
Michael 2021-07-13 06:06:08 +00:00
parent 299cff8c50
commit 1466afe3b2
6 changed files with 39 additions and 56 deletions

View file

@ -476,20 +476,11 @@ class User
*/
public static function getDefaultGroup($uid, $network = '')
{
$default_group = 0;
if ($network == Protocol::OSTATUS) {
$default_group = DI::pConfig()->get($uid, "ostatus", "default_group");
}
if ($default_group != 0) {
return $default_group;
}
$user = DBA::selectFirst('user', ['def_gid'], ['uid' => $uid]);
if (DBA::isResult($user)) {
$default_group = $user["def_gid"];
} else {
$default_group = 0;
}
return $default_group;