mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 01:05:42 +00:00
Add redirect for login page if the user is already loged in.
This commit is contained in:
parent
0de63e2b4b
commit
a49e862432
@ -9,6 +9,8 @@ from ..models import User
|
||||
|
||||
@auth.route('/login', methods=['GET', 'POST'])
|
||||
def login():
|
||||
if current_user.is_authenticated:
|
||||
return redirect(url_for('main.index'))
|
||||
form = LoginForm()
|
||||
if form.validate_on_submit():
|
||||
user = User.query.filter_by(email=form.login.data).first()
|
||||
|
Loading…
Reference in New Issue
Block a user