diff options
author | Daniel Kesselberg <mail@danielkesselberg.de> | 2019-09-18 16:52:42 +0200 |
---|---|---|
committer | Backportbot <backportbot-noreply@rullzer.com> | 2019-09-18 16:11:55 +0000 |
commit | 4cf30c82ee2f8dff1453748443647d0d4ae27e58 (patch) | |
tree | 1928c86f7f4986a9ae59c854623964dde653f480 /lib | |
parent | 33509a9834b198d3950c67e34d03b9385fc7bddb (diff) | |
download | nextcloud-server-4cf30c82ee2f8dff1453748443647d0d4ae27e58.tar.gz nextcloud-server-4cf30c82ee2f8dff1453748443647d0d4ae27e58.zip |
Add uid to delete temp token query
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Authentication/Token/PublicKeyTokenMapper.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/Authentication/Token/PublicKeyTokenMapper.php b/lib/private/Authentication/Token/PublicKeyTokenMapper.php index df91066c44f..62fbf1c6d7a 100644 --- a/lib/private/Authentication/Token/PublicKeyTokenMapper.php +++ b/lib/private/Authentication/Token/PublicKeyTokenMapper.php @@ -163,7 +163,8 @@ class PublicKeyTokenMapper extends QBMapper { $qb = $this->db->getQueryBuilder(); $qb->delete('authtoken') - ->where($qb->expr()->eq('type', $qb->createNamedParameter(IToken::TEMPORARY_TOKEN))) + ->where($qb->expr()->eq('uid', $qb->createNamedParameter($except->getUID()))) + ->andWhere($qb->expr()->eq('type', $qb->createNamedParameter(IToken::TEMPORARY_TOKEN))) ->andWhere($qb->expr()->neq('id', $qb->createNamedParameter($except->getId()))) ->andWhere($qb->expr()->eq('version', $qb->createNamedParameter(PublicKeyToken::VERSION, IQueryBuilder::PARAM_INT))); |