mirror of https://github.com/sualko/cloud_bbb
fix: use querybuilder for user comparaison
parent
0219cf5df0
commit
9538c35e79
|
@ -75,7 +75,7 @@ class RoomMapper extends QBMapper {
|
||||||
/* @var $qb IQueryBuilder */
|
/* @var $qb IQueryBuilder */
|
||||||
$qb = $this->db->getQueryBuilder();
|
$qb = $this->db->getQueryBuilder();
|
||||||
$this->joinShares($qb)
|
$this->joinShares($qb)
|
||||||
->addSelect($qb->createFunction('min(case when `r`.`user_id` ='. $qb->createNamedParameter($userId).' then '.RoomShare::PERMISSION_ADMIN.' else `s`.`permission` end) as permission'))
|
->addSelect($qb->createFunction('min(case when '.$qb->expr()->eq('r.user_id', $qb->createNamedParameter($userId)).' then '.RoomShare::PERMISSION_ADMIN.' else `s`.`permission` end) as permission'))
|
||||||
->where(
|
->where(
|
||||||
$qb->expr()->orX(
|
$qb->expr()->orX(
|
||||||
$qb->expr()->eq('r.user_id', $qb->createNamedParameter($userId)),
|
$qb->expr()->eq('r.user_id', $qb->createNamedParameter($userId)),
|
||||||
|
|
Loading…
Reference in New Issue