handle first and last names like other attributes
This commit is contained in:
parent
a838ce4679
commit
d89839dd65
|
@ -10,6 +10,6 @@ X-Python-Version: >= 2.6
|
|||
Package: python-authentic2-auth-fedict
|
||||
Architecture: all
|
||||
Depends: ${misc:Depends},
|
||||
python-authentic2 (>= 2.1.20.1009)
|
||||
python-authentic2 (>= 2.1.20.1054)
|
||||
Description: Fedict authentication frontend for Authentic2
|
||||
|
||||
|
|
|
@ -64,6 +64,8 @@ class AuthenticAdapter(DefaultAdapter):
|
|||
attributes['lieuxMariage'] = '|'.join(attributes.get('lieuxMariage'))
|
||||
|
||||
attribute_mapping = [
|
||||
('prenom', 'first_name'),
|
||||
('nom', 'last_name'),
|
||||
('commune', 'city'),
|
||||
('rue', 'street'),
|
||||
('rue', 'address'), # alternative attribute name
|
||||
|
@ -80,9 +82,6 @@ class AuthenticAdapter(DefaultAdapter):
|
|||
except Attribute.DoesNotExist:
|
||||
pass
|
||||
|
||||
user.first_name = attributes.get('prenom') or ''
|
||||
user.last_name = attributes.get('nom') or ''
|
||||
|
||||
def provision_attribute(self, user, idp, saml_attributes):
|
||||
super(AuthenticAdapter, self).provision_attribute(user, idp, saml_attributes)
|
||||
if not user.email:
|
||||
|
|
Loading…
Reference in New Issue