<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -35,7 +35,8 @@ class AuthSourceLdap &lt; AuthSource
     dn = String.new
     ldap_con.search( :base =&gt; self.base_dn, 
                      :filter =&gt; object_filter &amp; login_filter, 
-                     :attributes=&gt; ['dn', self.attr_firstname, self.attr_lastname, self.attr_mail]) do |entry|
+                     # only ask for the DN if on-the-fly registration is disabled
+                     :attributes=&gt; (onthefly_register? ? ['dn', self.attr_firstname, self.attr_lastname, self.attr_mail] : ['dn'])) do |entry|
       dn = entry.dn
       attrs = [:firstname =&gt; AuthSourceLdap.get_attr(entry, self.attr_firstname),
                :lastname =&gt; AuthSourceLdap.get_attr(entry, self.attr_lastname),</diff>
      <filename>app/models/auth_source_ldap.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>7535c211d5e660a7a65ee91e33f14881027836a7</id>
    </parent>
  </parents>
  <author>
    <name>Jean-Philippe Lang</name>
    <email>jp_lang@yahoo.fr</email>
  </author>
  <url>http://github.com/edavis10/redmine/commit/308118ce9724bdbea9dcb8ddf766e81b76a2d2df</url>
  <id>308118ce9724bdbea9dcb8ddf766e81b76a2d2df</id>
  <committed-date>2007-11-04T03:49:03-08:00</committed-date>
  <authored-date>2007-11-04T03:49:03-08:00</authored-date>
  <message>LDAP authentication: only ask for the user's DN if on-the-fly registration is disabled

git-svn-id: http://redmine.rubyforge.org/svn/trunk@882 e93f8b46-1217-0410-a6f0-8f06a7374b81</message>
  <tree>6d33bdbdb86d58cb521350a72c2355a60f166f12</tree>
  <committer>
    <name>Jean-Philippe Lang</name>
    <email>jp_lang@yahoo.fr</email>
  </committer>
</commit>
