lib/origen/users/ldap.rb
# Lookup the given user in the core directory and return an object representing the user's entry
# in the FSL application directory, run the display method from the console to see the field
# names and what information is available.
# The record for the given user will be cached the first time it is generated, so this method can be
# repeatedly called from the same thread without incurring a remote fetch each time.
#
#     entry = Origen.fsl.lookup("r49409")
#     entry.mail   # => stephen.mcginty@freescale.com
Lookup the given user in the core directory and return an object representing the user's entry
in the FSL application directory, run the display method from the console to see the field
names and what information is available.
The record for the given user will be cached the first time it is generated, so this method can be
repeatedly called from the same thread without incurring a remote fetch each time.


Lookup the given user in the core directory and return an object representing the user ' s entry in the FSL application directory run the display method from the console to see the field names and what information is available . The record for the given user will be cached the first time it is generated so this method can be repeatedly called from the same thread without incurring a remote fetch each time .
def lookup(user_or_id = Origen.current_user)
        id = id(user_or_id)
        unless instance_variable_defined?("@#{id.downcase}")
          record = service.search(base: BASE_DN, filter: "#{Origen.site_config.ldap_user_id_attribute || 'id'}=#{id}").first
          instance_variable_set("@#{id.downcase}", record)
        end
        instance_variable_get("@#{id.downcase}")
      end
def lookup ( user_or_id = Origen . current_user ) id = id ( user_or_id ) unless instance_variable_defined? ( "@#{id.downcase}" ) record = service . search ( base : BASE_DN , filter : "#{Origen.site_config.ldap_user_id_attribute || 'id'}=#{id}" ) . first instance_variable_set ( "@#{id.downcase}" , record ) end instance_variable_get ( "@#{id.downcase}" ) end
Lookup the given user in the core directory and return an object representing the user's entry
in the FSL application directory, run the display method from the console to see the field
names and what information is available.
Lookup the given user in the core directory and return an object representing the user ' s entry in the FSL application directory run the display method from the console to see the field names and what information is available .
user_or_id
<not_specific>
current_user
<not_specific>