]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fetch signle row
authorLukas Reschke <lukas@statuscode.ch>
Thu, 4 May 2017 22:08:23 +0000 (00:08 +0200)
committerLukas Reschke <lukas@statuscode.ch>
Thu, 18 May 2017 18:49:05 +0000 (20:49 +0200)
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
apps/oauth2/lib/Db/AccessTokenMapper.php

index 9702e2c58fd9f89db8a8a5b7503bf6f73a3b968a..2751302522c92bf4b5dc828ce44e66fe55c61062 100644 (file)
@@ -44,7 +44,7 @@ class AccessTokenMapper extends Mapper {
                        ->from($this->tableName)
                        ->where($qb->expr()->eq('hashed_code', $qb->createNamedParameter(hash('sha512', $code))));
                $result = $qb->execute();
-               $row = $result->fetchAll();
+               $row = $result->fetch();
                $result->closeCursor();
                return AccessToken::fromRow($row);
        }