mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Alsp check global AddressBook.sqlite on ClearUserData()
This commit is contained in:
parent
b1c435277c
commit
7cf5edc74a
1 changed files with 7 additions and 3 deletions
|
|
@ -111,9 +111,13 @@ abstract class Api
|
|||
$oStorageProvider->DeleteStorage($sEmail);
|
||||
}
|
||||
|
||||
$oAddressBookProvider = static::Actions()->AddressBookProvider();
|
||||
if ($oAddressBookProvider) {
|
||||
$oAddressBookProvider->DeleteAllContacts($sEmail);
|
||||
$oConfig = static::Config();
|
||||
$sqlite_global = $oConfig->Get('contacts', 'sqlite_global', false);
|
||||
if ('sqlite' != $oConfig->Get('contacts', 'type', '') || \is_file(APP_PRIVATE_DATA . '/AddressBook.sqlite')) {
|
||||
$oConfig->Set('contacts', 'sqlite_global', true);
|
||||
$oAddressBookProvider = static::Actions()->AddressBookProvider();
|
||||
$oAddressBookProvider && $oAddressBookProvider->DeleteAllContacts($sEmail);
|
||||
$oConfig->Set('contacts', 'sqlite_global', !!$sqlite_global);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue