1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-11-29 22:37:58 +02:00

Merge remote-tracking branch 'upstream/master' into webmail-sso

This commit is contained in:
Florent Daigniere
2021-03-10 14:41:12 +01:00
50 changed files with 946 additions and 181 deletions

View File

@@ -18,6 +18,7 @@ def login():
if form.validate_on_submit():
user = models.User.login(form.email.data, form.pw.data)
if user:
flask.session.regenerate()
flask_login.login_user(user)
endpoint = flask.request.args.get('next', '.index')
return flask.redirect(flask.url_for(endpoint)
@@ -31,6 +32,7 @@ def login():
@access.authenticated
def logout():
flask_login.logout_user()
flask.session.destroy()
return flask.redirect(flask.url_for('.index'))