Fix the infofasjson plugin attribute mapping
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
This commit is contained in:
parent
191f2f0fcf
commit
aca50a00bd
1 changed files with 9 additions and 4 deletions
|
@ -8,10 +8,15 @@ import fasjson_client
|
|||
|
||||
fasjson_mapping = [
|
||||
['email', 'email'],
|
||||
['username', 'username'],
|
||||
['timezone', 'timezone'],
|
||||
['username', 'nickname'],
|
||||
['username', 'preferred_username'],
|
||||
['timezone', 'zoneinfo'],
|
||||
['locale', 'locale'],
|
||||
['human_name', 'human_name'],
|
||||
['human_name', 'name'],
|
||||
['givenname', 'given_name'],
|
||||
['surname', 'family_name'],
|
||||
['ircnicks', 'ircnicks'],
|
||||
['gpgkeyids', 'gpg_keyids'],
|
||||
['groups', 'groups'],
|
||||
['agreements', 'agreements'],
|
||||
]
|
||||
|
@ -51,7 +56,7 @@ Info plugin that retrieves user data from FASJSON. """
|
|||
return {}
|
||||
|
||||
# assumption that first email is the default
|
||||
user_data['email'] = user_data['emails'][0]
|
||||
user_data['email'] = user_data['emails'][0] if user_data['emails'] else None
|
||||
|
||||
# add the groups to the user_data
|
||||
user_data['groups'] = [ g['groupname'] for g in user_group_data]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue