BUGFIX: Reset password now only sends email to accounts which exist within the database
This commit is contained in:
@@ -201,4 +201,15 @@ def remove_from_newsletter(email):
|
||||
db.execute("""
|
||||
DELETE FROM newsletter
|
||||
WHERE email = ?;
|
||||
""", (email,))
|
||||
""", (email,))
|
||||
|
||||
def email_exists(email):
|
||||
"""
|
||||
Returns whether email exists within database
|
||||
"""
|
||||
with Database() as db:
|
||||
data = db.fetchone("""
|
||||
SELECT * FROM users
|
||||
WHERE email = ?
|
||||
""", (email,))
|
||||
return bool(data)
|
||||
Reference in New Issue
Block a user