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é!" }); })