Skip to content
Snippets Groups Projects
Commit 70482210 authored by Martin Mareš's avatar Martin Mareš
Browse files

E-mail uživatele nekoliduje s tímtéž uživatelem :)

parent cc4d8bb6
No related branches found
No related tags found
No related merge requests found
......@@ -390,7 +390,8 @@ def org_user_edit(id: int):
if form.validate_on_submit():
check = True
if mo.users.user_by_email(form.email.data) is not None:
other_user = mo.users.user_by_email(form.email.data)
if other_user is not None and other_user != user:
flash('Zadaný e-mail nelze použít, existuje jiný účet s tímto e-mailem', 'danger')
check = False
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment