From 9ddea082598f762df223c96e1af71e78f66b3cfd Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Fri, 4 Jun 2021 15:13:44 +0530 Subject: fix not logging user after registeration --- app/views/auth.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'app/views/auth.py') 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) -- cgit v1.2.3