@@ -35,7 +35,8 class AuthSourceLdap < AuthSource | |||
|
35 | 35 | dn = String.new |
|
36 | 36 | ldap_con.search( :base => self.base_dn, |
|
37 | 37 | :filter => object_filter & login_filter, |
|
38 | :attributes=> ['dn', self.attr_firstname, self.attr_lastname, self.attr_mail]) do |entry| | |
|
38 | # only ask for the DN if on-the-fly registration is disabled | |
|
39 | :attributes=> (onthefly_register? ? ['dn', self.attr_firstname, self.attr_lastname, self.attr_mail] : ['dn'])) do |entry| | |
|
39 | 40 | dn = entry.dn |
|
40 | 41 | attrs = [:firstname => AuthSourceLdap.get_attr(entry, self.attr_firstname), |
|
41 | 42 | :lastname => AuthSourceLdap.get_attr(entry, self.attr_lastname), |
General Comments 0
You need to be logged in to leave comments.
Login now