Skip to content

Instantly share code, notes, and snippets.

@JamesSkemp
Created July 14, 2014 20:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JamesSkemp/ab3408f4618d1f98e8a8 to your computer and use it in GitHub Desktop.
Save JamesSkemp/ab3408f4618d1f98e8a8 to your computer and use it in GitHub Desktop.
Find Sitecore users with an Administrator Flag (may return some false positives)
// query against XXX_Sitecore_Core
var adminUsers = from profile in Aspnet_Profiles
join user in Aspnet_Users on profile.UserId equals user.UserId
where profile.PropertyNames.Contains("Administrator")
&& profile.PropertyValuesString.Contains("True")
select new { Profile = profile, User = user }
;
adminUsers
.OrderBy (u => u.User.LastActivityDate)
.Dump();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment