I while back someone on the ASP.NET forum help me write the following msSQL view. I'm moving to DNN 4.3.5 and wanted to see if someone could point me in the right direction to pull the same user profile information out of this new UserProfile table? I've reviewed the Enhancing Profile _3.3_.pdf, but can't same to get it right. My msSQL View statement that I used for DNN3.2 is below. Does anyone know how to pull this off with under DNN4.3+?
Thanks so much for your help.
CREATE VIEW dbo.vw_MyView_UserProfiles AS SELECT dbo.aspnet_Profile.UserId, dbo.aspnet_Users.UserName, dbo.aspnet_Users.LoweredUserName, dbo.aspnet_Membership.Password, dbo.aspnet_Membership.Email, dbo.aspnet_Membership.LoweredEmail,
dbo.GetProfileElement('FirstName', dbo.aspnet_Profile.PropertyNames, dbo.aspnet_Profile.PropertyValuesString) AS FirstName,
dbo.GetProfileElement('LastName', dbo.aspnet_Profile.PropertyNames, dbo.aspnet_Profile.PropertyValuesString) AS LastName,
((dbo.GetProfileElement('FirstName', dbo.aspnet_Profile.PropertyNames, dbo.aspnet_Profile.PropertyValuesString)) + ' ' + (dbo.GetProfileElement('LastName', dbo.aspnet_Profile.PropertyNames, dbo.aspnet_Profile.PropertyValuesString))) AS FullName,
dbo.GetProfileElement('Street', dbo.aspnet_Profile.PropertyNames, dbo.aspnet_Profile.PropertyValuesString) AS Street,
dbo.GetProfileElement('City', dbo.aspnet_Profile.PropertyNames, dbo.aspnet_Profile.PropertyValuesString) AS City,
dbo.GetProfileElement('PostalCode', dbo.aspnet_Profile.PropertyNames, dbo.aspnet_Profile.PropertyValuesString) AS PostalCode,
dbo.GetProfileElement('Country', dbo.aspnet_Profile.PropertyNames, dbo.aspnet_Profile.PropertyValuesString) AS Country,
dbo.GetProfileElement('Phone', dbo.aspnet_Profile.PropertyNames, dbo.aspnet_Profile.PropertyValuesString) AS Phone,
dbo.GetProfileElement('Fax', dbo.aspnet_Profile.PropertyNames, dbo.aspnet_Profile.PropertyValuesString) AS Fax,
dbo.GetProfileElement('Cell', dbo.aspnet_Profile.PropertyNames, dbo.aspnet_Profile.PropertyValuesString) AS Cell,
dbo.GetProfileElement('TimeZone', dbo.aspnet_Profile.PropertyNames, dbo.aspnet_Profile.PropertyValuesString) AS TimeZone
FROM dbo.aspnet_Profile INNER JOIN dbo.aspnet_Users ON dbo.aspnet_Profile.UserId = dbo.aspnet_Users.UserId INNER JOIN dbo.aspnet_Membership ON dbo.aspnet_Users.UserId = dbo.aspnet_Membership.UserId
WHERE dbo.aspnet_Membership.PasswordFormat = 0 AND dbo.aspnet_Membership.IsApproved = 1 AND dbo.aspnet_Membership.IsLockedOut = 0
|