mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-03 06:27:02 +03:00
Added \RainLoop\Api::ClearUserData() function
This commit is contained in:
parent
290cf38b97
commit
9a30680748
11 changed files with 363 additions and 279 deletions
|
|
@ -671,6 +671,30 @@ class PdoAddressBook
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sEmail
|
||||
* @param bool $bSyncDb = true
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function DeleteAllContactsAndTags($sEmail, $bSyncDb = true)
|
||||
{
|
||||
if ($bSyncDb)
|
||||
{
|
||||
$this->SyncDatabase();
|
||||
}
|
||||
|
||||
$iUserID = $this->getUserId($sEmail);
|
||||
|
||||
$aParams = array(':id_user' => array($iUserID, \PDO::PARAM_INT));
|
||||
|
||||
$this->prepareAndExecute('DELETE FROM rainloop_ab_properties WHERE id_user = :id_user', $aParams);
|
||||
$this->prepareAndExecute('DELETE FROM rainloop_ab_contacts WHERE id_user = :id_user', $aParams);
|
||||
$this->prepareAndExecute('DELETE FROM rainloop_ab_tags WHERE id_user = :id_user', $aParams);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sEmail
|
||||
* @param array $aTagsIds
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue