Method: Inspec::Resources::WindowsUser#identity

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

#identity(username) ⇒ Object



567
568
569
570
571
572
573
574
# File 'lib/inspec/resources/users.rb', line 567

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] == name }
  res[0] unless res.empty?
end