Skip to content
Snippets Groups Projects
Commit 2aca3729 authored by Andrea Callia D'Iddio's avatar Andrea Callia D'Iddio Committed by Ivan Procaccini
Browse files

Set username from the returned LDAP attributes.

parent eb86bb8c
No related branches found
No related tags found
1 merge request!13Set username from the returned LDAP attributes.
......@@ -43,6 +43,7 @@ def login():
if attributes is None:
flash(messages.LOGIN_UNSUCCESSFUL_ERROR)
return render_template("pages/login.html", form=form)
username = attributes["name"]
user = AuthenticatedUser.query.filter_by(username=username).first()
if not user:
user = AuthenticatedUser(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment