From 9aaa5a3496f6cff9f7011f90ee3cf684a09a9e15 Mon Sep 17 00:00:00 2001 From: soudarsane Date: Thu, 22 Jun 2023 13:43:53 +0200 Subject: [PATCH] =?UTF-8?q?correction=20admin=20utilisateur=20d=C3=A9sacti?= =?UTF-8?q?v=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/passport/passportFunctions.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/passport/passportFunctions.ts b/app/passport/passportFunctions.ts index cd83ad5..377ab22 100644 --- a/app/passport/passportFunctions.ts +++ b/app/passport/passportFunctions.ts @@ -75,6 +75,9 @@ passport.use( if (!passwordMatches) { return done(null, false, { message: "Mot de passe incorrect" }); } + if (userLogged.statut == false) { + return done(null, false, { message: "Compte désactivé" }); + } return done(null, user, { message: "Vous êtes connecté!" }); })