Shazwazza/UmbracoIdentity

Can't set custom properties during creation of a Custom Member Type

trevor-ratliff opened this issue · 2 comments

I have created a new member type in Umbraco and added a few custom properties on that member type. I have copied your UmbracoIdentityAccountController.cs into a new class so future updates of UmbracoIdentity won't mess with some custom code to allow oauth endpoint configuration based on a json config file.

I can create new members using the 2 different providers I have tried so far (Google and Identity Server). However when I try adding UmbracoProperty objects to the UmbracoApplicationMember instance's MemberProperties list prior to creation those properties aren't stored in the Umbraco member record.

In your UmbracoUmebersUserStore.cs on line 75 you have a call to update a member record's properties from the UmbracoApplicaitonMember using the "UpdateMemberProperties" method.

The code in UpdateMemberProperties looks like it should set the custom properties correctly, but I'm not seeing the data in Umbraco under the member account. When I pull the member by Id, I'm not seeing the data there either.

What am I doing wrong? Is there a bug were custom properties are ignored?

okay, so I figured out that in order for the membershipProperties collection items to be modified the properties have to be member editable in the member type. Once they are editable there then I could save them with the UmbracoIdentity.UmbracoMembersUserManager.UpdateAsync(). I'm not sure about creation of member records yet with custom properties, I'm still testing.

I was able to add custom properties to new member records as well. I'm closing the issue.