Skip to content

Commit

Permalink
Merge pull request #17198 from nextcloud/backport/17194/stable15
Browse files Browse the repository at this point in the history
[stable15] Add uid to delete temp token query
  • Loading branch information
rullzer committed Sep 19, 2019
2 parents 24450d5 + 8e63c51 commit 436177f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/private/Authentication/Token/PublicKeyTokenMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ public function deleteTempToken(PublicKeyToken $except) {
$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)));

Expand Down

0 comments on commit 436177f

Please sign in to comment.