FreddleSpl0it 2 лет назад
Родитель
Сommit
84ff6ff2c5
1 измененных файлов с 6 добавлено и 2 удалено
  1. 6 2
      data/web/inc/functions.inc.php

+ 6 - 2
data/web/inc/functions.inc.php

@@ -960,12 +960,16 @@ function check_login($user, $pass, $app_passwd_data = false) {
           );
           );
           return "pending";
           return "pending";
         } else if (!isset($authenticators['additional']) || !is_array($authenticators['additional']) || count($authenticators['additional']) == 0) {
         } else if (!isset($authenticators['additional']) || !is_array($authenticators['additional']) || count($authenticators['additional']) == 0) {
+          unset($_SESSION['ldelay']);
           // no authenticators found, login successfull
           // no authenticators found, login successfull
           // Reactivate TFA if it was set to "deactivate TFA for next login"
           // Reactivate TFA if it was set to "deactivate TFA for next login"
           $stmt = $pdo->prepare("UPDATE `tfa` SET `active`='1' WHERE `username` = :user");
           $stmt = $pdo->prepare("UPDATE `tfa` SET `active`='1' WHERE `username` = :user");
           $stmt->execute(array(':user' => $user));
           $stmt->execute(array(':user' => $user));
-
-          unset($_SESSION['ldelay']);
+          $_SESSION['return'][] =  array(
+            'type' => 'success',
+            'log' => array(__FUNCTION__, $user, '*'),
+            'msg' => array('logged_in_as', $user)
+          );
           return "user";
           return "user";
         }
         }
       } elseif ($app_passwd_data['eas'] === true || $app_passwd_data['dav'] === true) {
       } elseif ($app_passwd_data['eas'] === true || $app_passwd_data['dav'] === true) {