Explorar o código

show message when logged in user tries goes to register

Son NK %!s(int64=5) %!d(string=hai) anos
pai
achega
711ae83751
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      app/auth/views/register.py

+ 1 - 0
app/auth/views/register.py

@@ -25,6 +25,7 @@ class RegisterForm(FlaskForm):
 def register():
     if current_user.is_authenticated:
         LOG.d("user is already authenticated, redirect to dashboard")
+        flash("You are already logged in", "warning")
         return redirect(url_for("dashboard.index"))
 
     form = RegisterForm(request.form)