I have a simple user control that presents the user a form to complete. The code behind creates the member successfully, but I cannot populate the member extended properties that I created.
I created a member type with properties like First Name, Last Name, etc.
After I create the user, I am trying to set the properties in code:
I have tried many variations on the above code, but the properties don't show up in the back end. The member is there, but the property is blank.
I used this as a guide: http://www.aaron-powell.com/umbraco-members-profiles and wrote my own class, edited the web.config etc, but still I am not having success. In one thread Neils said this was not supported and should not be used. Can anyone confirm that 4.7 does not have a "built in" way to store extra user properties via code/api?
In 4.5 they made the Member Methods, properties depecated and now edit member properties via the profile is the prefered way of doing things. However I think it is still easier to use the Methods on the Member class itself.
Member member = Member.GetMemberFromLoginName( newUser.UserName); member.getProperty("your alias").Value = "some value;"; member.Save();
Add Member Properties via API in v4.7
I have a simple user control that presents the user a form to complete. The code behind creates the member successfully, but I cannot populate the member extended properties that I created.
I created a member type with properties like First Name, Last Name, etc.
After I create the user, I am trying to set the properties in code:
I have tried many variations on the above code, but the properties don't show up in the back end. The member is there, but the property is blank.
I used this as a guide: http://www.aaron-powell.com/umbraco-members-profiles and wrote my own class, edited the web.config etc, but still I am not having success. In one thread Neils said this was not supported and should not be used. Can anyone confirm that 4.7 does not have a "built in" way to store extra user properties via code/api?
Hi,
In 4.5 they made the Member Methods, properties depecated and now edit member properties via the profile is the prefered way of doing things. However I think it is still easier to use the Methods on the Member class itself.
Hope this helps you,
Richard
is working on a reply...