Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
21 | public function getUserRoleIds(string $userId): array |
||
22 | { |
||
23 | $qb = $this->createQueryBuilder('userRole'); |
||
24 | |||
25 | $qb->select('userRole.roleId') |
||
26 | ->where($qb->expr()->eq('userRole.userId', $userId)) |
||
27 | ->indexBy('userRole', 'userRole.roleId'); |
||
28 | |||
29 | $roleIds = $qb->getQuery()->getArrayResult(); |
||
30 | |||
31 | return array_keys($roleIds); |
||
32 | } |
||
34 |