Skip to content
This repository was archived by the owner on May 13, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions verify/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ def register():
'SELECT id FROM user WHERE username = ?', (username,)
).fetchone() is not None:
error = 'User {0} is already registered.'.format(username)
elif db.execute(
'SELECT * FROM user WHERE phone_number = ?', (phone,)
).fetchone() is not None:
error = 'Phone {0} is already in use. Please, use another phone number'.format(phone)

if error is None:
session['phone'] = phone
Expand Down