Commit eacd0506 authored by Jean-Philippe Lang's avatar Jean-Philippe Lang

Fixed: LDAP authentication crashes if one of the LDAP attributes name is left…

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
parent 0e4e0a79
......@@ -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?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment