Compare commits

..

No commits in common. "265e6d5f6508f309b8aef84e64fca0202081b6a2" and "78227870bc851aabcbd3ae12688b995eea3b1ef2" have entirely different histories.

3 changed files with 3 additions and 10 deletions

0
sqlite Normal file
View File

View File

@ -122,12 +122,9 @@ def signin(token) :
# Une fois que tout c'est bien passé pour l'inscription on détruit le jeton.
cursor.execute("""SELECT name, invitations FROM users where Token=?""", (token,))
tmp = cursor.fetchone()
username = tmp[0]
username =tmp[0]
invitations_count=tmp[1] - 1
if username == "pywallter":
cursor.execute("""DELETE from users where name = ?""", (username,))
else:
cursor.execute("""UPDATE users set invitations=?, Token='' where name=?""", (invitations_count, username,))
cursor.execute("""UPDATE users set invitations=?, Token='' where name=?""", (invitations_count, username,))
conn.commit()
flash(u'Inscription réalisée avec succés !', 'succes')

View File

@ -63,11 +63,7 @@ def index():
cursor.execute("""SELECT token passwd FROM users where name=? """, ("pywallter", ))
tmp = cursor.fetchone()
conn.close
if tmp:
token = tmp[0]
else:
token = None
token = tmp[0]
if 'username' in session :
return redirect(url_for('profil.profile'))
else :