summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-10-19 19:36:42 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-10-19 19:36:42 +0000
commiteacd050630b2d2b3047e056a7dab7661fba083ca (patch)
tree1a2532481e85fec9e3eec948843325474402bc89 /app
parent0e4e0a795a7259a096fbbecbf12dcd16d99de0e9 (diff)
downloadredmine-eacd050630b2d2b3047e056a7dab7661fba083ca.tar.gz
redmine-eacd050630b2d2b3047e056a7dab7661fba083ca.zip
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
Diffstat (limited to 'app')
-rw-r--r--app/models/auth_source_ldap.rb2
1 files changed, 1 insertions, 1 deletions
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?