diff --git a/ajax/ajax_2fa.php b/ajax/ajax_2fa.php deleted file mode 100644 index cf7fd0c9..00000000 --- a/ajax/ajax_2fa.php +++ /dev/null @@ -1,61 +0,0 @@ -. - * - */ - -use Plugins\Authenticator\Authenticator; -use SP\Core\Session; -use SP\Core\SessionUtil; -use SP\Http\Request; -use SP\Http\Response; - -define('APP_ROOT', '..'); - -require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php'; - -Request::checkReferer('POST'); - -$sk = Request::analyze('sk', false); - -if (!$sk || !SessionUtil::checkSessionKey($sk)) { - Response::printJson(_('CONSULTA INVÁLIDA')); -} - -$userId = Request::analyze('itemId', 0); -$pin = Request::analyze('security_pin', 0); - -$TwoFa = new Authenticator($userId); - -if ($userId - && $pin - && $TwoFa->verifyKey($pin) -) { - Session::set2FApassed(true); - - $urlParams = Request::importUrlParamsToGet(); - - Response::printJson(_('Código correcto'), 0); -} else { - Session::set2FApassed(false); - Response::printJson(_('Código incorrecto')); -} \ No newline at end of file diff --git a/inc/themes/material-blue/views/account/account.inc b/inc/themes/material-blue/views/account/account.inc index add0363a..6acb1153 100644 --- a/inc/themes/material-blue/views/account/account.inc +++ b/inc/themes/material-blue/views/account/account.inc @@ -185,7 +185,8 @@ - > account_id === $accountData->getAccountParentId()) ? 'selected' : ''; ?> @@ -247,9 +248,11 @@ data-icon-up="getIconUp()->getIcon(); ?>">getIconDown()->getIcon(); ?> - - includeTemplate('aux-customfields', 'common'); ?> -
+
+ + includeTemplate('aux-customfields', 'common'); ?> +
+