Ver Fonte

Fix error in login script

Jaap Marcus há 5 anos atrás
pai
commit
6ea5906357
1 ficheiros alterados com 2 adições e 1 exclusões
  1. 2 1
      web/login/index.php

+ 2 - 1
web/login/index.php

@@ -97,6 +97,8 @@ function authenticate_user($user, $password, $twofa = ''){
                 // Check if 2FA is active
                 // Check if 2FA is active
                 if ($data[$user]['TWOFA'] != '') {
                 if ($data[$user]['TWOFA'] != '') {
                         if(empty($twofa)){
                         if(empty($twofa)){
+                            $_SESSION['login']['username'] = $user;
+                            $_SESSION['login']['password'] = $password;
                             return false;
                             return false;
                         }else{
                         }else{
                             $v_twofa = escapeshellarg($twofa);
                             $v_twofa = escapeshellarg($twofa);
@@ -150,7 +152,6 @@ function authenticate_user($user, $password, $twofa = ''){
                     exit;
                     exit;
                 }
                 }
             }
             }
-        }
     } else {
     } else {
         unset($_POST);
         unset($_POST);
         unset($_GET);
         unset($_GET);