aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNavan Chauhan <navanchauhan@gmail.com>2021-06-04 15:13:44 +0530
committerNavan Chauhan <navanchauhan@gmail.com>2021-06-04 15:13:44 +0530
commit9ddea082598f762df223c96e1af71e78f66b3cfd (patch)
tree65e6a15d2a5fbfdfdf24b18398738faaeeada8f7
parent847a571e93c2600b466542e54936abf25cc1c675 (diff)
fix not logging user after registeration
-rw-r--r--app/views/auth.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/views/auth.py b/app/views/auth.py
index 0193431..eb9a46a 100644
--- a/app/views/auth.py
+++ b/app/views/auth.py
@@ -21,7 +21,10 @@ def register_user():
try:
db.session.commit()
except IntegrityError:
- flash("Oops! An account with that email already exists")
+ flash("Oops! An account with that email already exists")
+ return render_template("auth/signup.html",form=form)
+ flask_login.login_user(user)
+ return redirect(url_for("user_dashboard"))
flash_errors(form)
return render_template("auth/signup.html",form=form)