mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 18:19:22 +03:00
Code refactoring
This commit is contained in:
parent
7c25098c1b
commit
ff7b71fd6c
9 changed files with 203 additions and 211 deletions
|
|
@ -137,8 +137,7 @@ class Api
|
|||
$sEmail = \MailSo\Base\Utils::IdnToAscii($sEmail);
|
||||
|
||||
$oStorageProvider = \RainLoop\Api::Actions()->StorageProvider();
|
||||
|
||||
if ($oStorageProvider)
|
||||
if ($oStorageProvider && $oStorageProvider->IsActive())
|
||||
{
|
||||
// TwoFactor Auth User Data
|
||||
$oStorageProvider->Clear(null,
|
||||
|
|
@ -157,12 +156,15 @@ class Api
|
|||
\RainLoop\Providers\Storage\Enumerations\StorageType::CONFIG,
|
||||
'contacts_sync'
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
\RainLoop\Api::Actions()->SettingsProvider()->ClearByEmail($sEmail);
|
||||
|
||||
\RainLoop\Api::Actions()->AddressBookProvider()->DeleteAllContactsAndTags($sEmail);
|
||||
if (\RainLoop\Api::Actions()->AddressBookProvider() &&
|
||||
\RainLoop\Api::Actions()->AddressBookProvider()->IsActive())
|
||||
{
|
||||
\RainLoop\Api::Actions()->AddressBookProvider()->DeleteAllContactsAndTags($sEmail);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue