Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Whats the new way to read and write custom umbraco member properties?
I am using Umbraco Ver 6.2.2
I have added additional fields like "middlename", etc in the umbraco backend to a member type and I want to be able to read and write to them in code.
I was using the class umbraco.cms.businesslogic.member, but is deprecated.
For Example (Old Way)umbracomember = Member.GetMemberFromLoginName("user")umbracomember.getProperty("middlename").Value = strName;
But as mentioned, Member.GetMemberFromLoginName is obsolete. And on the save method it is taking along time to execute (Upto 15 seconds)
Can anyone plesae point me to some documentation on how to achieve this using the new membership provider.
Thanks
Hi Warren,
The new way is to use the API services, as you can find here: https://our.umbraco.org/documentation/reference/management-v6/Services/
As you can see there is for Members https://our.umbraco.org/documentation/reference/management-v6/Services/MemberService, MemberType https://our.umbraco.org/documentation/reference/management-v6/Services/MemberTypeService and last there is one for MemberGroups too https://our.umbraco.org/documentation/reference/management-v6/Services/MemberGroupService
Hope this helps,
/Dennis
Thanks Dennis
My google seraches were turning up nothing.
Hmmmm. I can't seem to find anything in the documentation relating to the updating umbraco member properties.
I will playing around with the classess, to see if I can find anything.
I found this link useful. It has code samples for the Properties method.
http://24days.in/umbraco/2014/dealing-with-members/
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Whats the new way to read and write custom umbraco member properties?
Whats the new way to read and write custom umbraco member properties?
I am using Umbraco Ver 6.2.2
I have added additional fields like "middlename", etc in the umbraco backend to a member type and I want to be able to read and write to them in code.
I was using the class umbraco.cms.businesslogic.member, but is deprecated.
For Example (Old Way)
umbracomember = Member.GetMemberFromLoginName("user")
umbracomember.getProperty("middlename").Value = strName;
But as mentioned, Member.GetMemberFromLoginName is obsolete. And on the save method it is taking along time to execute (Upto 15 seconds)
Can anyone plesae point me to some documentation on how to achieve this using the new membership provider.
Thanks
Hi Warren,
The new way is to use the API services, as you can find here: https://our.umbraco.org/documentation/reference/management-v6/Services/
As you can see there is for Members https://our.umbraco.org/documentation/reference/management-v6/Services/MemberService, MemberType https://our.umbraco.org/documentation/reference/management-v6/Services/MemberTypeService and last there is one for MemberGroups too https://our.umbraco.org/documentation/reference/management-v6/Services/MemberGroupService
Hope this helps,
/Dennis
Thanks Dennis
My google seraches were turning up nothing.
Hmmmm. I can't seem to find anything in the documentation relating to the updating umbraco member properties.
I will playing around with the classess, to see if I can find anything.
I found this link useful. It has code samples for the Properties method.
http://24days.in/umbraco/2014/dealing-with-members/
is working on a reply...