Description

This function removes removes the user from the two-factor authentication userdata file.

Examples 


https://hostname.example.com:2083/cpsess##########/execute/TwoFactorAuth/remove_user_configuration

$cpanel = new CPANEL(); // Connect to cPanel - only do this once.

// Remove TwoFactorAuth user configuration.
$sa_settings = $cpanel->uapi(
    'TwoFactorAuth', 'remove_user_configuration'
);

 

my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.

# Remove TwoFactorAuth user configuration.
my $sa_settings = $cpliveapi->uapi(
    'TwoFactorAuth', 'remove_user_configuration',
    }
);

 

<!-- Remove TwoFactorAuth user configuration. -->
[% execute('TwoFactorAuth', 'remove_user_configuration') %]

 

uapi --user=username TwoFactorAuth remove_user_configuration

{  
   "messages":null,
   "errors":null,
   "status":1,
   "data":{  
      "tfa_removed" : 1
   },
   "metadata":{} 
}

Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible valuesExample
tfa_removedBooleanWhether the system removed the user from the two-factor authentication userdata file.
  • 1 — Removed.

If a removal fails, the system sends a failure response with the reason in the metadata.


1