This commit is contained in:
pika 2025-03-31 17:31:30 +02:00
parent da0a156ada
commit 2ad04860a3
2 changed files with 9 additions and 3 deletions

View file

@ -74,8 +74,10 @@ def register():
db.session.add(new_user)
db.session.commit()
flash("Registration successful! You can now log in.", "success")
return redirect(url_for("auth.login"))
# Log the user in automatically
login_user(new_user)
flash("Registration successful! Welcome!", "success")
return redirect(url_for("dashboard.dashboard_home"))
return render_template("auth/register.html", title="Register")