From eacd050630b2d2b3047e056a7dab7661fba083ca Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 19 Oct 2007 19:36:42 +0000 Subject: [PATCH] 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 --- app/models/auth_source_ldap.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/auth_source_ldap.rb b/app/models/auth_source_ldap.rb index c8b0a12c9..2433c96b1 100644 --- a/app/models/auth_source_ldap.rb +++ b/app/models/auth_source_ldap.rb @@ -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? -- 2.39.5