Project

General

Profile

« Previous | Next » 

Revision b7f90cc0

Added by Stephen Benjamin about 10 years ago

fixes #4643 - Retrieving Optional LDAP attributes fails on 1.8.7

View differences:

app/models/auth_sources/auth_source_ldap.rb
def attributes_values entry
Hash[required_ldap_attributes.merge(optional_ldap_attributes).map do |name, value|
next if entry[value].empty? and optional_ldap_attributes.keys.include? name
next if value.blank? || (entry[value].blank? && optional_ldap_attributes.keys.include?(name))
if name.eql? :avatar
[:avatar_hash, store_avatar(entry[value].first)]
else

Also available in: Unified diff