Skip to content
Snippets Groups Projects
Commit 28034dd0 authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

check if user has email property

parent 55e7d5d4
No related branches found
No related tags found
No related merge requests found
...@@ -127,7 +127,7 @@ def get_user_mapping(): ...@@ -127,7 +127,7 @@ def get_user_mapping():
user_map[ldap_dn] = user['email'] user_map[ldap_dn] = user['email']
for ldap_dn in user['attributes'].get('KEYCLOAK_DN', []): for ldap_dn in user['attributes'].get('KEYCLOAK_DN', []):
user_map[ldap_dn] = user['email'] user_map[ldap_dn] = user['email']
if 'firstName' in user and 'lastName' in user: if 'firstName' in user and 'lastName' in user and 'email' in user:
user_map['%s, %s' % (user['lastName'], user['firstName'])] = user['email'] user_map['%s, %s' % (user['lastName'], user['firstName'])] = user['email']
return user_map return user_map
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