@@ -35,7 +35,8 class AuthSourceLdap < AuthSource | |||||
35 | dn = String.new |
|
35 | dn = String.new | |
36 | ldap_con.search( :base => self.base_dn, |
|
36 | ldap_con.search( :base => self.base_dn, | |
37 | :filter => object_filter & login_filter, |
|
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 | dn = entry.dn |
|
40 | dn = entry.dn | |
40 | attrs = [:firstname => AuthSourceLdap.get_attr(entry, self.attr_firstname), |
|
41 | attrs = [:firstname => AuthSourceLdap.get_attr(entry, self.attr_firstname), | |
41 | :lastname => AuthSourceLdap.get_attr(entry, self.attr_lastname), |
|
42 | :lastname => AuthSourceLdap.get_attr(entry, self.attr_lastname), |
General Comments 0
You need to be logged in to leave comments.
Login now