mirror of
https://github.com/simple-login/app.git
synced 2024-11-18 01:40:38 +01:00
Handle invalid email when user signs up
This commit is contained in:
parent
8abdf655fc
commit
b8093aefa3
1 changed files with 5 additions and 1 deletions
|
@ -46,7 +46,11 @@ def register():
|
||||||
user = User.create(email=email, name="", password=form.password.data)
|
user = User.create(email=email, name="", password=form.password.data)
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
|
||||||
send_activation_email(user, next_url)
|
try:
|
||||||
|
send_activation_email(user, next_url)
|
||||||
|
except:
|
||||||
|
flash("Invalid email, are you sure the email is correct?", "error")
|
||||||
|
return redirect(url_for("auth.register"))
|
||||||
|
|
||||||
return render_template("auth/register_waiting_activation.html")
|
return render_template("auth/register_waiting_activation.html")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue