Returns an array with two-factor settings like email field or phone number field.
Syntax
Security::twoFactorSettings()
Arguments
No arguments
Return value
Returns an array with two-factor settings.
Example
If we have the following two-factor settings in our project:

This example shows how to print two-factor settings:
$twoFactorSettings = Security::twoFactorSettings();
echo($twoFactorSettings["emailField"]);
echo("<br>");
echo($twoFactorSettings["phoneField"]);
Sample output
email
phone
See also: