www/members/ldap-namecheck.cgi [67:98]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    end

    people.sort_by(&:name).each do |p|
      next if p.banned?
      next if p.name == 'apldaptest'

      given = p.givenName rescue '' # some entries have not set this up

      parse = ASF::Person.ldap_name(p.cn)
      new_given = parse['givenName'] || ''
      new_sn = parse['sn']
      unused = parse['unused']
      _initials = parse['initials']

      givenOK = ASF::Person.names_equivalent?(new_given, given)
      badGiven += 1 unless givenOK

      snOK =    (new_sn == p.sn)
      badSN += 1 unless snOK

      icla = ASF::ICLA.find_by_id(p.uid)
      public_name = icla.name rescue nil
      next unless public_name # Don't check entries not in iclas.txt

      cnOK = (public_name == p.cn)
      pnames=public_name.gsub(%r{[(),]}, '').split # drop special characters that may terminate names
      missingGiven = given.split.any? {|one| ! (one == p.uid or pnames.include?(one) or pnames.any? {|pn| ASF::Person.names_equivalent?(pn, one)})}
      missingsn = p.sn.split.any? {|one| ! (one == p.uid or pnames.include? one or pnames.any? {|pn| ASF::Person.names_equivalent?(pn, one)})}
      if givenOK and snOK and cnOK and ! missingGiven and ! missingsn # all checks OK
        matches += 1
        next
      end
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



www/secretary/ldap-names.cgi [122:153]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    end

    people.sort_by(&:name).each do |p|
      next if p.banned?
      next if p.name == 'apldaptest'

      given = p.givenName rescue '' # some entries have not set this up

      parse = ASF::Person.ldap_name(p.cn)
      new_given = parse['givenName'] || ''
      new_sn = parse['sn']
      unused = parse['unused']
      _initials = parse['initials']

      givenOK = ASF::Person.names_equivalent?(new_given, given)
      badGiven += 1 unless givenOK

      snOK =    (new_sn == p.sn)
      badSN += 1 unless snOK

      icla = ASF::ICLA.find_by_id(p.uid)
      public_name = icla.name rescue nil
      next unless public_name # Don't check entries not in iclas.txt

      cnOK = (public_name == p.cn)
      pnames=public_name.gsub(%r{[(),]}, '').split # drop special characters that may terminate names
      missingGiven = given.split.any? {|one| ! (one == p.uid or pnames.include?(one) or pnames.any? {|pn| ASF::Person.names_equivalent?(pn, one)})}
      missingsn = p.sn.split.any? {|one| ! (one == p.uid or pnames.include? one or pnames.any? {|pn| ASF::Person.names_equivalent?(pn, one)})}
      if givenOK and snOK and cnOK and ! missingGiven and ! missingsn # all checks OK
        matches += 1
        next
      end
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



