Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

where are the member properties stored in umbraco

Tags:

umbraco

I'm trying to export member properties like first name, last name from the database but I can't seem to find it. I see that there is a loginUser table with the right columns, but it seems to only hold 5 entries instead of the full list of people that I see in the admin interface.

like image 698
MonkeyBonkey Avatar asked Jan 15 '13 18:01

MonkeyBonkey


2 Answers

Douglas is right, it's probably easier to access the membership provider.

But I worked on a project recently where we needed to do some querying for a rather large member base and the membership API was too slow, so we did the following view. Hope that helps:

SELECT        MEMBTYPEID.text AS MemberType, MEMBLST.nodeId, MEMBTYPES.Name AS MemberField, MEMBTYPES.Alias AS MemberFieldAlias, MEMB.LoginName, 
                         (CASE WHEN MEMBDATA.[dataInt] IS NOT NULL THEN CONVERT(NVARCHAR(500), MEMBDATA.[dataInt]) ELSE MEMBDATA.[dataNvarchar] END) 
                         AS MemberData
FROM            dbo.umbracoNode AS MEMBTYPEID INNER JOIN
                         dbo.cmsContent AS MEMBLST ON MEMBLST.contentType = MEMBTYPEID.id INNER JOIN
                         dbo.cmsPropertyType AS MEMBTYPES ON MEMBTYPES.contentTypeId = MEMBLST.contentType INNER JOIN
                         dbo.cmsPropertyData AS MEMBDATA ON MEMBDATA.contentNodeId = MEMBLST.nodeId AND MEMBDATA.propertytypeid = MEMBTYPES.id INNER JOIN
                         dbo.cmsMember AS MEMB ON MEMB.nodeId = MEMBLST.nodeId
WHERE        (MEMBTYPEID.nodeObjectType = '9b5416fb-e72f-45a9-a07b-5a9a2709ce43')

The "where" clause just filters the nodes to be of type Member (I don't know if this GUID is constant for all implementations, please check first)

like image 154
amhed Avatar answered Nov 23 '22 18:11

amhed


The member properties are stored in the cmsPropertyData table. The contentNodeId will correspond to the id of the member.

It may be easier to use the api to export your data. Umbraco uses the standard ASP.NET Membership Provider model. See Membership providers for more details.

like image 42
Douglas Ludlow Avatar answered Nov 23 '22 18:11

Douglas Ludlow