Skip to content

Loading…

Modified doctrine DBAL query in ZfcUserDoctrine identity provider. #22

Merged
merged 1 commit into from

2 participants

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/BjyAuthorize/Provider/Identity/ZfcUserDoctrine.php
View
7 src/BjyAuthorize/Provider/Identity/ZfcUserDoctrine.php
@@ -25,9 +25,10 @@ public function getIdentityRoles()
} else {
// get roles associated with the logged in user
$builder = new \Doctrine\DBAL\Query\QueryBuilder($this->em->getConnection());
- $builder->select("role.role_id")
- ->from('user_role_linker', 'user_role_linker')
- ->where('role.user_id = ?', $authService->getIdentity()->getId());
+ $builder->select("linker.role_id")
+ ->from('user_role_linker', 'linker')
+ ->where('linker.user_id = :user_id')
+ ->setParameter('user_id', $authService->getIdentity()->getId());
$result = $builder->execute();
Something went wrong with that request. Please try again.