keep trying new queries, no idea why it isn't working

This commit is contained in:
2021-11-02 13:45:46 -04:00
parent 229b6422fd
commit 436712f52d

View File

@@ -166,8 +166,7 @@ for ldapUser in ldapUsers:
logger.debug("Checking if LDAP user is in SQl Table")
cnx = mysql.connector.connect(**dbconfig)
cursor = cnx.cursor()
query = "SELECT * FROM LDAPUsers WHERE email = '%s'" % ldapUser.mail
logger.debug("Query: {0}".format(query))
query = "SELECT * FROM LDAPUsers WHERE email = '{0}'".format(ldapUser.mail)
cursor.execute(query)
row_count = cursor.rowcount
logger.debug("Found {0} SQL LDAP user".format(cursor.rowcount))