Skip to content

Commit

Permalink
removed debugger and cleaned up login
Browse files Browse the repository at this point in the history
  • Loading branch information
cschiewek committed Jul 22, 2010
1 parent 72a1aee commit 0234181
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
0.1.5
0.1.6
2 changes: 1 addition & 1 deletion devise_ldap_authenticatable.gemspec
Expand Up @@ -5,7 +5,7 @@

Gem::Specification.new do |s|
s.name = %q{devise_ldap_authenticatable}
s.version = "0.1.5"
s.version = "0.1.6"

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Curtis Schiewek"]
Expand Down
6 changes: 3 additions & 3 deletions lib/devise_ldap_authenticatable/ldap_adapter.rb
Expand Up @@ -7,8 +7,9 @@ module Devise
module LdapAdapter

def self.valid_credentials?(login, attributes, password)
debugger
login = [::Devise.ldap_login_attribute+'='+login, attributes,::Devise.ldap_base_dn].join(',')
login = "#{::Devise.ldap_login_attribute}=#{login},"
login += "#{attributes}," unless attributes.nil?
login += ::Devise.ldap_base_dn
@encryption = ::Devise.ldap_ssl ? :simple_tls : nil
ldap = Net::LDAP.new(:encryption => @encryption)
ldap.host = ::Devise.ldap_host
Expand All @@ -17,7 +18,6 @@ def self.valid_credentials?(login, attributes, password)
if ldap.bind
true
else
# errors.add_to_base(ldap.get_operation_result.message)
false
end
end
Expand Down

0 comments on commit 0234181

Please sign in to comment.