Skip to content

Instantly share code, notes, and snippets.

@ProNotion
Last active June 27, 2023 08:33
Show Gist options
  • Save ProNotion/0659399aebda8c84e1ba213e42846aba to your computer and use it in GitHub Desktop.
Save ProNotion/0659399aebda8c84e1ba213e42846aba to your computer and use it in GitHub Desktop.
Get Umbraco Members with last login date
SELECT m.LoginName, m.Email, cmsPropertyData.dataDate AS LastLoginDate
FROM cmsPropertyType INNER JOIN
cmsPropertyData ON
cmsPropertyType.id = cmsPropertyData.propertytypeid RIGHT OUTER JOIN
cmsMember AS m ON cmsPropertyData.contentNodeId = m.nodeId
WHERE (cmsPropertyType.Alias = N'umbracoMemberLastLogin') AND (cmsPropertyData.dataDate IS NOT NULL)
ORDER BY LastLoginDate DESC
@ProNotion
Copy link
Author

FYI This will only include accounts where the user has logged in at least once

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment