Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Db/AliasMapper.php')
-rw-r--r--lib/Db/AliasMapper.php14
1 files changed, 4 insertions, 10 deletions
diff --git a/lib/Db/AliasMapper.php b/lib/Db/AliasMapper.php
index ce46fe5d1..6c9eabe8f 100644
--- a/lib/Db/AliasMapper.php
+++ b/lib/Db/AliasMapper.php
@@ -71,18 +71,12 @@ class AliasMapper extends QBMapper {
* @param int $accountId the account whose aliases will be deleted
* @param string $currentUserId the user that is currently logged in
*/
- public function deleteAll($accountId, $currentUserId) {
+ public function deleteAll($accountId) {
$qb = $this->db->getQueryBuilder();
- $query = $qb->delete($this->getTableName(), 'aliases')
- ->join('aliases', 'mail_accounts', 'accounts', $qb->expr()->eq('aliases.account_id', 'accounts.id'))
- ->where($qb->expr()->eq('account_id', $qb->createNamedParameter($accountId)))
- ->andWhere(
- $qb->expr()->andX(
- $qb->expr()->eq('accounts.user_id', $qb->createNamedParameter($currentUserId)),
- $qb->expr()->eq('aliases.account_id', $qb->createNamedParameter($accountId))
- )
- );
+ $query = $qb
+ ->delete($this->getTableName())
+ ->where($qb->expr()->eq('account_id', $qb->createNamedParameter($accountId)));
$query->execute();
}