manually set direct first/last names attributes
This commit is contained in:
parent
6f9e3fd272
commit
3c0b46ffb9
|
@ -69,6 +69,13 @@ class AuthenticAdapter(DefaultAdapter):
|
|||
# assume all answers are for Belgium, this may not actually be true
|
||||
attributes['pays'] = 'Belgique'
|
||||
|
||||
# set "direct" first/last names attributes, or they'll get overwritten
|
||||
# with the value from the SAML assertion and marked as non-verified.
|
||||
# (because the NRN only return the first first name, not all of them).
|
||||
user.first_name = attributes.get('prenom') or ''
|
||||
user.last_name = attributes.get('nom') or ''
|
||||
user.save()
|
||||
|
||||
attribute_mapping = [
|
||||
('prenom', 'first_name'),
|
||||
('nom', 'last_name'),
|
||||
|
|
Loading…
Reference in New Issue