/** * @return array */ public function DoClearTwoFactorInfo() { if (!$this->TwoFactorAuthProvider()->IsActive()) { return $this->FalseResponse(__FUNCTION__); } $oAccount = $this->getAccountFromToken(); $this->StorageProvider()->Clear(null, \RainLoop\Providers\Storage\Enumerations\StorageType::NOBODY, \RainLoop\KeyPathHelper::TwoFactorAuthUserData($oAccount->ParentEmailHelper())); return $this->DefaultResponse(__FUNCTION__, $this->getTwoFactorInfo($oAccount->ParentEmailHelper(), true)); }
/** * @todo * @param string $sEmail * * @return bool */ public static function ClearUserDateStorage($sEmail) { $sEmail = \MailSo\Base\Utils::IdnToAscii($sEmail); // TwoFactor Auth User Data self::Actions()->StorageProvider()->Clear(null, \RainLoop\Providers\Storage\Enumerations\StorageType::NOBODY, \RainLoop\KeyPathHelper::TwoFactorAuthUserData($sEmail)); }
/** * @param string $sEmail * * @return bool */ public static function ClearUserData($sEmail) { if (0 < \strlen($sEmail)) { $sEmail = \MailSo\Base\Utils::IdnToAscii($sEmail); $oStorageProvider = \RainLoop\Api::Actions()->StorageProvider(); if ($oStorageProvider && $oStorageProvider->IsActive()) { // TwoFactor Auth User Data $oStorageProvider->Clear(null, \RainLoop\Providers\Storage\Enumerations\StorageType::NOBODY, \RainLoop\KeyPathHelper::TwoFactorAuthUserData($sEmail)); // Accounts list $oStorageProvider->Clear(null, \RainLoop\Providers\Storage\Enumerations\StorageType::NOBODY, \RainLoop\KeyPathHelper::WebmailAccounts($sEmail)); // Contact sync data $oStorageProvider->Clear($sEmail, \RainLoop\Providers\Storage\Enumerations\StorageType::CONFIG, 'contacts_sync'); } \RainLoop\Api::Actions()->SettingsProvider()->ClearByEmail($sEmail); if (\RainLoop\Api::Actions()->AddressBookProvider() && \RainLoop\Api::Actions()->AddressBookProvider()->IsActive()) { \RainLoop\Api::Actions()->AddressBookProvider()->DeleteAllContactsAndTags($sEmail); } return true; } return false; }