modifié : views/inscription.py
This commit is contained in:
parent
78227870bc
commit
f33e9f611a
@ -122,9 +122,12 @@ 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
|
||||
cursor.execute("""UPDATE users set invitations=?, Token='' where name=?""", (invitations_count, username,))
|
||||
if username == "pywallter":
|
||||
cursor.execute("""DELETE from users where name = ?""", (username,))
|
||||
else:
|
||||
cursor.execute("""UPDATE users set invitations=?, Token='' where name=?""", (invitations_count, username,))
|
||||
conn.commit()
|
||||
|
||||
flash(u'Inscription réalisée avec succés !', 'succes')
|
||||
|
Loading…
Reference in New Issue
Block a user