Permalink
Browse files

return array values and not nil if reqested attribute is an array wit…

…h more than 1 value
  • Loading branch information...
1 parent ccf9041 commit 3e7eeb1bef792359e3f157e28c5dfc3fb69cdb9c @anark anark committed Mar 21, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/devise_ldap_authenticatable/ldap_adapter.rb
@@ -101,6 +101,7 @@ def ldap_param_value(param)
DeviseLdapAuthenticatable::Logger.send("Requested param #{param} has value #{ldap_entry.send(param)}")
value = ldap_entry.send(param)
value = value.first if value.is_a?(Array) and value.count == 1
+ value
else
DeviseLdapAuthenticatable::Logger.send("Requested param #{param} does not exist")
value = nil

0 comments on commit 3e7eeb1

Please sign in to comment.