aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyaggr3g470r/views.py')
-rw-r--r--pyaggr3g470r/views.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py
index daf1d84e..25717dce 100644
--- a/pyaggr3g470r/views.py
+++ b/pyaggr3g470r/views.py
@@ -151,18 +151,20 @@ def login():
user = User.query.filter(User.email == form.email.data).first()
login_user(user)
g.user = user
+ session['email'] = form.email.data
identity_changed.send(current_app._get_current_object(), identity=Identity(user.id))
flash(gettext("Logged in successfully."), 'success')
return redirect(url_for('home'))
return render_template('login.html', form=form)
-
@app.route('/logout/')
@login_required
def logout():
"""
Log out view. Removes the user information from the session.
"""
+ session.pop('email', None)
+
# Remove the user information from the session
logout_user()
bgstack15