mirror of
https://github.com/nextcloud/passman.git
synced 2025-09-06 04:54:24 +08:00
fix using a string literal without proper parameter binding in a query builder expression
fix deprecated db query builder execute calls Signed-off-by: binsky <timo@binsky.org>
This commit is contained in:
parent
f235428850
commit
f44591b4fd
1 changed files with 3 additions and 3 deletions
|
@ -109,15 +109,15 @@ class NotificationService {
|
|||
->from('notifications')
|
||||
->where($qb->expr()->eq('object_id', $qb->createNamedParameter($credential->getId(), IQueryBuilder::PARAM_INT)))
|
||||
->andWhere($qb->expr()->eq('subject', $qb->createNamedParameter('credential_expired', IQueryBuilder::PARAM_STR)));
|
||||
return $qb->execute()->rowCount() !== 0;
|
||||
return $qb->executeQuery()->rowCount() !== 0;
|
||||
}
|
||||
|
||||
function deleteNotificationsOfCredential($credential) {
|
||||
$qb = $this->db->getQueryBuilder();
|
||||
$qb->delete('notifications')
|
||||
->where($qb->expr()->eq('object_id', $qb->createNamedParameter($credential->getId(), IQueryBuilder::PARAM_INT)))
|
||||
->andWhere($qb->expr()->eq('object_type', 'credential'));
|
||||
return $qb->execute();
|
||||
->andWhere($qb->expr()->eq('object_type', $qb->createNamedParameter('credential', IQueryBuilder::PARAM_STR)));
|
||||
return $qb->executeStatement();
|
||||
}
|
||||
|
||||
function markNotificationOfCredentialAsProcessed(int $credential_id, string $user_id): void {
|
||||
|
|
Loading…
Add table
Reference in a new issue