diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2017-05-04 23:55:38 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2017-05-18 20:49:03 +0200 |
commit | a5ddd65c10ff8812f6b49bc9703a2858a6c323e6 (patch) | |
tree | e0d13fcacd14d418ce1276175de89ad91a7dad1a /apps/oauth2/lib/Db/ClientMapper.php | |
parent | 5f71805c35d04e585ea6d4227254b11204413dfd (diff) | |
download | nextcloud-server-a5ddd65c10ff8812f6b49bc9703a2858a6c323e6.tar.gz nextcloud-server-a5ddd65c10ff8812f6b49bc9703a2858a6c323e6.zip |
Use query builder
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'apps/oauth2/lib/Db/ClientMapper.php')
-rw-r--r-- | apps/oauth2/lib/Db/ClientMapper.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/apps/oauth2/lib/Db/ClientMapper.php b/apps/oauth2/lib/Db/ClientMapper.php index d3c09ac5c69..8d1f26ce471 100644 --- a/apps/oauth2/lib/Db/ClientMapper.php +++ b/apps/oauth2/lib/Db/ClientMapper.php @@ -42,9 +42,13 @@ class ClientMapper extends Mapper { $qb ->select('*') ->from($this->tableName) - ->where($qb->expr()->eq('client_identifier', $qb->createParameter('clientId'))); - - return $this->findEntity($qb->getSQL(), [$clientIdentifier]); + ->where($qb->expr()->eq('client_identifier', $qb->createNamedParameter($clientIdentifier))); + $result = $qb->execute(); + $rows = $result->fetchAll(); + $result->closeCursor(); + return array_map(function ($row) { + return Client::fromRow($row); + }, $rows); } /** |