Commits

Anonymous committed 4d4c02e

Fixed: LDAP authentication crashes if one of the LDAP attributes name is left blank on the LDAP setup screen.
When not checking "On-the-fly" register, the 3 optional fields can now be safely left blank.

  • Participants
  • Parent commits faf4772

Comments (0)

Files changed (1)

File app/models/auth_source_ldap.rb

       attrs = [:firstname => AuthSourceLdap.get_attr(entry, self.attr_firstname),
                :lastname => AuthSourceLdap.get_attr(entry, self.attr_lastname),
                :mail => AuthSourceLdap.get_attr(entry, self.attr_mail),
-               :auth_source_id => self.id ]
+               :auth_source_id => self.id ] if onthefly_register?
     end
     return nil if dn.empty?
     logger.debug "DN found for #{login}: #{dn}" if logger && logger.debug?