Last active
July 18, 2017 22:18
-
-
Save pboucher/9259387100dbc7680f69f4dd1aef6f3a to your computer and use it in GitHub Desktop.
Find users' custom home pages on hosted sites for data analysis.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
site = ENV["RAILS_ENV"] | |
HumanUser.find(:all, :conditions=>{:retirement_date=>nil}).each do |u| | |
next if u.custom_home_page.nil? || ['inbox', 'my_tasks', 'new_user_welcome'].include?(u.custom_home_page.page_type) | |
data = ["DATA_LINE",site] | |
data << u.login | |
data << u.permission_rule_set.display_name | |
data << u.custom_home_page.id | |
data << u.custom_home_page.name || '' | |
data << u.custom_home_page.page_type || '' | |
data << u.custom_home_page.entity_type || '' | |
output = data.join(',') | |
puts output | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment