From 2cdb45954e0123678f366c7b253bc86851177116 Mon Sep 17 00:00:00 2001 From: John Gaunt Date: Tue, 2 Nov 2021 12:49:41 -0400 Subject: [PATCH] updated prepared query --- seafile-ldap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/seafile-ldap.py b/seafile-ldap.py index b95fe92..b92fefa 100644 --- a/seafile-ldap.py +++ b/seafile-ldap.py @@ -167,8 +167,8 @@ for ldapUser in ldapUsers: cnx = mysql.connector.connect(**dbconfig) logger.debug("SQL Connection: {0}".format(cnx)) cursor = cnx.cursor() - query = ("SELECT * FROM LDAPUsers WHERE email = %s") - cursor.executemany(query, (ldapUser.mail,)) + query = ("SELECT * FROM LDAPUsers WHERE email = {0}".format(ldapUser.mail)) + cursor.execute(query) sqlLDAPuser = cursor.fetchall() print(sqlLDAPuser) break