/**
* Fetch a single user channel
*
- * @param int $id
- * @param int $uid
+ * @param int $id The id of the user defined channel
+ * @param int $uid The user that this channel belongs to. (Not part of the primary key)
* @return TimelineEntity
* @throws \Friendica\Network\HTTPException\NotFoundException
*/
return $return;
}
- public static function getByUID(int $uid): array
- {
- $circles = [];
-
- $stmt = DBA::select('group', [], ['deleted' => false, 'uid' => $uid, 'cid' => null], ['order' => ['id']]);
- while ($circle = DBA::fetch($stmt)) {
- $circles[] = [
- 'id' => $circle['id'],
- 'name' => $circle['name'],
- ];
- }
- DBA::close($stmt);
-
- return $circles;
- }
-
/**
* Returns a templated circle selection list
*
-2 => $this->l10n->t('Followers'),
];
- foreach (Circle::getByUID($uid) as $circle) {
+ foreach (Circle::getByUserId($uid) as $circle) {
$circles[$circle['id']] = $circle['name'];
}