mirror of
https://github.com/DragonMinded/bemaniutils.git
synced 2026-03-21 17:24:33 -05:00
Don't crash if a client tries to create an account with a card we know already.
This commit is contained in:
parent
19c68dd8e3
commit
3850d120c9
|
|
@ -1387,6 +1387,10 @@ class UserData(BaseData):
|
|||
Returns:
|
||||
A User ID if creation was successful, or None otherwise.
|
||||
"""
|
||||
existing = self.from_cardid(cardid)
|
||||
if existing:
|
||||
return None
|
||||
|
||||
# First, create a user account
|
||||
sql = "INSERT INTO user (pin, admin) VALUES (:pin, 0)"
|
||||
cursor = self.execute(sql, {"pin": pin})
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user