[% SET CPANEL.CPVAR.dprefix = "../../"; USE ExpVar; SET is_secpolicy_enabled = ExpVar.expand('$is_twofactorauth_sec_policy_enabled'); SET has_feature = CPANEL.feature('twofactorauth'); SET api_call_result = {}; SET return_link = "index.html"; IF CPANEL.FORM.defined('do_the_removal'); SET api_call_result = execute("TwoFactorAuth", "remove_user_configuration", {}); END; %] [% WRAPPER '_assets/master.html.tt' app_key = 'two_factor_authentication' include_legacy_stylesheets = 0 page_stylesheets = ['security/2fa/index.min.css'] %]
[% IF is_secpolicy_enabled && has_feature %] [% IF api_call_result.defined('status') %] [% IF api_call_result.status && api_call_result.data.tfa_removed %]
[% locale.maketext("[output,strong,Success:] The system removed two-factor authentication from your account.") %]
[% ELSE %]
[% FOREACH msg = api_call_result.errors; %]
[% msg.html(); %]
[% END; %]
[% END %] [% ELSE %]

[% locale.maketext('Are you sure you want to remove two-factor authentication from your account?') %]

[% locale.maketext('Cancel') %]
[% END %] [% INCLUDE _assets/return_link.html.tt return_location=return_link return_link_text=locale.maketext('Go Back') %] [% ELSE %]
[% locale.maketext('You do not have access to this feature. You must have the [asis,Two-factor Authentication] feature enabled for your account to use this interface.') %]
[% END %]
[% END #wrapper %]