Permalink
Browse files

Merge pull request #22 from srayner/master

Modified doctrine DBAL query in ZfcUserDoctrine identity provider.
  • Loading branch information...
2 parents 6e324ef + 29b4d87 commit d5cb2ae133278b4949ab022070f2c0ab9e33836d @bjyoungblood committed Aug 29, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 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();

0 comments on commit d5cb2ae

Please sign in to comment.