Method: Inspec::Resources::WindowsUser#identity

Defined in:
lib/inspec/resources/users.rb

#identity(username) ⇒ Object



703
704
705
706
707
708
709
710
# File 'lib/inspec/resources/users.rb', line 703

def identity(username)
  # TODO: we look for local users only at this point
  name, _domain = (username)
  return if collect_user_details.nil?

  res = collect_user_details.select { |user| user[:username].casecmp? name }
  res[0] unless res.empty?
end