lib/puavo_authentication/controllers/helpers.rb in puavo_authentication-0.0.7 vs lib/puavo_authentication/controllers/helpers.rb in puavo_authentication-0.0.8

- old
+ new

@@ -76,8 +76,14 @@ logger.debug "base: #{base}" logger.debug "dn: #{session[:dn]}" #logger.debug "password: #{session[:password_plaintext]}" LdapBase.ldap_setup_connection(host, base, dn, password) end + + def remove_ldap_connection + ActiveLdap::Base.active_connections.keys.each do |connection_name| + ActiveLdap::Base.remove_connection(connection_name) + end + end end end end