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.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@854 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2007-10-19 19:36:42 +00:00
parent 0e4e0a795a
commit eacd050630
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ class AuthSourceLdap < AuthSource
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?