1
0
Fork 0
mirror of https://github.com/fastogt/fastocloud_admin.git synced 2025-03-09 23:38:52 +00:00

ToLower for email

This commit is contained in:
topilski 2019-08-29 10:37:41 -04:00
parent 0789f7e101
commit 3ae9d1fb7f

View file

@ -33,7 +33,8 @@ def post_login(form: SigninForm):
flash_error(form.errors)
return render_template('home/login.html', form=form)
check_user = ProviderUser.objects(email=form.email.data).first()
email = form.email.data.lower()
check_user = ProviderUser.objects(email=email).first()
if not check_user:
flash_error(gettext(u'User not found.'))
return render_template('home/login.html', form=form)