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
Hi
I would to know if it is possible to update the 'Login' of an existing member programmatically.
Can you please advise? Thanking you in advance for your help.
Regards
Try this:
var member = Services.MemberService.GetByEmail("[email protected]");
member.SetValue("prop", "value");
Services.MemberService.Save(member, true);
thanks for your reply. Will give it a try and let you know how it goes.
Hi I forgot to mention that I am using version 4.7 of umbraco. I don't have the appropriate dlls in that version. So what I did is update the table for members directly by an SQL query.
Thanks a lot
http://our.umbraco.org/wiki/reference/api-cheatsheet/working-with-members
Member m = Member.GetCurrentMember(); m.getProperty("address").Value = addressBox.Text; m.Save();
How come you are working with 4.7?
If it is not a big site I will recommend to upgrade.
Thanks for your replies. The site is actually quite big and is has been done quite some years back that's why it is still 4.7.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Update Members Programatically
Hi
I would to know if it is possible to update the 'Login' of an existing member programmatically.
Can you please advise? Thanking you in advance for your help.
Regards
Try this:
var member = Services.MemberService.GetByEmail("[email protected]");
member.SetValue("prop", "value");
Services.MemberService.Save(member, true);
thanks for your reply. Will give it a try and let you know how it goes.
Hi I forgot to mention that I am using version 4.7 of umbraco. I don't have the appropriate dlls in that version. So what I did is update the table for members directly by an SQL query.
Thanks a lot
Try this:
http://our.umbraco.org/wiki/reference/api-cheatsheet/working-with-members
Member m = Member.GetCurrentMember();
m.getProperty("address").Value = addressBox.Text;
m.Save();
How come you are working with 4.7?
If it is not a big site I will recommend to upgrade.
Hi
Thanks for your replies. The site is actually quite big and is has been done quite some years back that's why it is still 4.7.
Regards
is working on a reply...