diff --git a/apps/maarch_entreprise/log.php b/apps/maarch_entreprise/log.php
index a3c33e0451a31662cb48f54f548adc458cd4b589..2ba263ba6d14d22fceae7bcc2b6db5c1e85fa560 100755
--- a/apps/maarch_entreprise/log.php
+++ b/apps/maarch_entreprise/log.php
@@ -215,7 +215,6 @@ if (!empty($_SESSION['error'])) {
                 //TODO: protect sql injection with PDO
                 require_once 'core/class/class_db_pdo.php';
 
-                \SrcCore\models\AuthenticationModel::resetFailedAuthentication(['userId' => $login]);
                 // Instantiate database.
                 $database = new Database();
                 $stmt = $database->query(
@@ -224,6 +223,20 @@ if (!empty($_SESSION['error'])) {
                 ); //permet de rechercher les utilisateurs dans le LDAP sans prendre en compte la casse
                 $result = $stmt->fetch();
 
+                if (!empty($result['locked_until'])) {
+                    $lockedDate = new \DateTime($result['locked_until']);
+                    $currentDate = new \DateTime();
+                    if ($currentDate < $lockedDate) {
+                        $_SESSION['error'] = _ACCOUNT_LOCKED_UNTIL . " {$lockedDate->format('d/m/Y H:i')}";
+                        header(
+                            'location: ' . $_SESSION['config']['businessappurl']
+                            . 'index.php?display=true&page=login'
+                        );
+                        exit;
+                    }
+                }
+                \Core\Models\AuthenticationModel::resetFailedAuthentication(['userId' => $login]);
+
                 if ($result) {
                     $_SESSION['error'] = '';
                     if (!empty($standardConnect) && $standardConnect == 'true') {
diff --git a/sql/develop.sql b/sql/develop.sql
index 62a48e0e2ad3a5158f56136e7a6f8245ae864cd8..5dd19ad4cadefdca89d486d20b58c449b55e5068 100644
--- a/sql/develop.sql
+++ b/sql/develop.sql
@@ -524,4 +524,4 @@ INSERT INTO status (id, label_status, is_system, img_filename, maarch_module, ca
 
 
 DELETE FROM parameters WHERE id = 'homepage_message';
-INSERT INTO parameters (id, description, param_value_string) VALUES ('homepage_message', 'Texte apparaissant dans la banière sur la page d''acceuil, laisser vide pour supprimer la banière.', 'Bienvenue dans votre <b>G</b>estion <b>E</b>lectronique du <b>C</b>ourrier.');
\ No newline at end of file
+INSERT INTO parameters (id, description, param_value_string) VALUES ('homepage_message', 'Texte apparaissant dans la bannière sur la page d''accueil, mettre un espace pour supprimer la bannière.', 'Bienvenue dans votre <b>G</b>estion <b>E</b>lectronique du <b>C</b>ourrier.');
\ No newline at end of file