diff --git a/lib/Db/CirclesRequest.php b/lib/Db/CirclesRequest.php index f36cbfe17..dd613862c 100644 --- a/lib/Db/CirclesRequest.php +++ b/lib/Db/CirclesRequest.php @@ -165,7 +165,8 @@ public function getCircles( $circles = []; $cursor = $qb->execute(); while ($data = $cursor->fetch()) { - if ($name === '' || stripos(strtolower($data['name']), strtolower($name)) !== false) { + if ($name === '' || stripos(strtolower($data['name']), strtolower($name)) !== false + || stripos(strtolower($data['alt_name']), strtolower($name)) !== false) { $circles[] = $this->parseCirclesSelectSql($data); } } diff --git a/lib/Db/CirclesRequestBuilder.php b/lib/Db/CirclesRequestBuilder.php index 5b9bd76c7..fc02595ca 100644 --- a/lib/Db/CirclesRequestBuilder.php +++ b/lib/Db/CirclesRequestBuilder.php @@ -173,6 +173,7 @@ private function generateLimitSecret(IQueryBuilder $qb, $circleUniqueId, $type, $orX = $expr->orX($expr->gte('u.level', $qb->createNamedParameter(Member::LEVEL_MEMBER))); $orX->add($expr->eq('c.name', $qb->createNamedParameter($name))) + ->add($expr->eq('c.alt_name', $qb->createNamedParameter($name))) ->add($expr->eq('c.unique_id', $qb->createNamedParameter($circleUniqueId))); if ($this->leftJoinedNCGroupAndUser) {