Просмотр исходного кода

Fixed an issue when 2fa was enabled user is unable to edit user settings (#2316)

Jaap Marcus 4 лет назад
Родитель
Сommit
bea7ee291e
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      web/edit/user/index.php

+ 1 - 1
web/edit/user/index.php

@@ -135,7 +135,7 @@ if (!empty($_POST['save'])) {
     }
 
     // Enable twofa
-    if ((!empty($_POST['v_twofa'])) && (empty($_SESSION['error_msg']))) {
+    if ((!empty($_POST['v_twofa'])) && (empty($v_twofa)) && (empty($_SESSION['error_msg']))) {
         exec(HESTIA_CMD."v-add-user-2fa ".escapeshellarg($v_username), $output, $return_var);
         check_return_code($return_var, $output);
         unset($output);