if 'mail' not in self.ldap_atts:
print >> sys.stderr, 'mail not found for %s' % self.cname
- return None
+ # return None
# Strip leading/ending whitespace; LDAP data can be dirty
# Using email for username deliberately here
- self.usrname = self._simple_map('mail').lower()
- self.email = self._simple_map('mail').lower()
+ self.usrname = (self._simple_map('mail') or '').lower()
+ self.email = (self._simple_map('mail') or '').lower()
self.family_name = self._simple_map('sn')
self.ident_type, self.ident_value = self.get_identity()
self.home_ou = self.get_home_ou()
'faculty': 11,
'staff': 15,
'proxy': None,
+ 'retired': None,
'affiliate': 15
}
else:
print >> sys.stderr, "Affiliation '%s' not mapped to a profile " \
"for user %s" % (affiliation, self.usrname)
+ return None
def get_home_ou(self):
"""
if res:
update_ldap_barcode(con, user)
if ARGS.push_barcode:
+ if user.barcode:
+ continue
+
try:
uid = find_evergreen_user(auth, user)
except AttributeError:
print >> sys.stderr, "No profile set for %s" % user.usrname
return
+ if user.barcode is not None:
+ return
+
found = find_evergreen_user(auth, user)
if found:
print("Found: %s" % user.usrname)