コード例 #1
0
ファイル: class.php プロジェクト: ASDAFF/1C_Bitrix_info_site
 protected function regenerateRecoveryCodes()
 {
     CUserOptions::SetOption('security', 'recovery_codes_generated', time());
     RecoveryCodesTable::regenerateCodes($this->arParams['USER_ID']);
     return $this->getRecoveryCodes(false, false);
 }
コード例 #2
0
function regenerateRecoveryCodes($userId)
{
    if (!Otp::getByUser($userId)->isActivated()) {
        ShowError('OTP inactive');
    }
    CUserOptions::SetOption('security', 'recovery_codes_generated', time());
    RecoveryCodesTable::regenerateCodes($userId);
    return getRecoveryCodes($userId, false);
}