From 8f3dd5db1536b67404c64e9bf5b3f59161d8ab62 Mon Sep 17 00:00:00 2001 From: Aveias Date: Mon, 31 Jul 2017 10:16:59 +0200 Subject: [PATCH] Correction bug identifiant current user --- Auth/authentication.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Auth/authentication.py b/Auth/authentication.py index 19f7027..56f3c76 100644 --- a/Auth/authentication.py +++ b/Auth/authentication.py @@ -28,11 +28,10 @@ class Auth(): #On va récupérer les infos en BDD link = dbo.DBLink() - result = link.query("SELECT IDUtil, Nom, MdP FROM utilisateur WHERE Identifiant = %s", [self.input_id, ]) + result = link.query("SELECT IDUtil, MdP FROM utilisateur WHERE Identifiant = %s", [self.input_id, ]) - for id_user, nom, mdp in result: + for id_user, mdp in result: user_id = id_user - user_id = nom user_psswd = mdp #Si l'user ID a été trouvé @@ -40,7 +39,7 @@ class Auth(): if user_id != None: if self.input_psswd.hexdigest() == user_psswd: Auth.access = True - Auth.current_user_id = id_user + Auth.current_user_id = user_id print("Accès autorisé") else: print("Accès refusé : Le mot de passe est incorrect")