Browse Source

show message when logged in user tries goes to register

Son NK 5 years ago
parent
commit
711ae83751
1 changed files with 1 additions and 0 deletions
  1. 1 0
      app/auth/views/register.py

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

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