application.logger.debug("Connected to users database")
cur.execute("select user_index,login from users where email=%s and expires_at between now()+'1 hour' and now()+'26 hours'",(tokendict['mail'],))
cur.execute(
"select user_index,login from users where email=%s and expires_at between now()+'1 hour' and now()+'26 hours'",
(tokendict["mail"],),
)
application.logger.debug(cur.mogrify("select user_index,login from users where email=%s and expires_at between now()+'1 hour' and now()+'26 hours'",(tokendict['mail'],)))
application.logger.debug(
cur.mogrify(
"select user_index,login from users where email=%s and expires_at between now()+'1 hour' and now()+'26 hours'",
(tokendict["mail"],),
)
)
ifcur.rowcount!=0:
(uid,login)=cur.fetchone()
application.logger.debug("Found a temporary account corresponding to %s: %s",tokendict['mail'],uid)
cur.execute("select password_hash from credentials where user_index=%s",(uid,))
application.logger.debug(
"Found a temporary account corresponding to %s: %s",
tokendict["mail"],
uid,
)
cur.execute(
"select password_hash from credentials where user_index=%s",(uid,)