Changeset - a781d315191c
[Not reviewed]
beta
0 1 0
"Lorenzo M. Catucci" - 15 years ago 2011-04-26 14:02:53
lorenzo@sancho.ccd.uniroma2.it
Set a default value for needed attributes.
1 file changed with 6 insertions and 6 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/auth.py
Show inline comments
 
@@ -205,12 +205,12 @@ def authenticate(username, password):
 
                log.debug('Got ldap DN response %s', user_dn)
 

	
 
                user_attrs = {
 
                    'name': ldap_attrs[ldap_settings\
 
                                       .get('ldap_attr_firstname')][0],
 
                    'lastname': ldap_attrs[ldap_settings\
 
                                           .get('ldap_attr_lastname')][0],
 
                    'email': ldap_attrs[ldap_settings\
 
                                        .get('ldap_attr_email')][0],
 
                    'name': ldap_attrs.get(ldap_settings\
 
                                       .get('ldap_attr_firstname'), [''])[0],
 
                    'lastname': ldap_attrs.get(ldap_settings\
 
                                           .get('ldap_attr_lastname'),[''])[0],
 
                    'email': ldap_attrs.get(ldap_settings\
 
                                        .get('ldap_attr_email'), [''])[0],
 
                    }
 

	
 
                if user_model.create_ldap(username, password, user_dn,
0 comments (0 inline, 0 general)