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
Is there a way to change a member name (text) via the usitebuilder MemberTypeBase? I know I can do somehting like
umbraco.cms.businesslogic.member.Text = 'new member name'
but it would be nice not to have to instatiate the umbraco member class if I don't need to.
Any update on this, or should I just use the Umbraco API directly to accomplish this requirement?
Yes, sure it is possible as following:
myMember.LoginName = "newname";
myMember.Save(); (from version 1.2) or MemberHelper.Save(myMember);
Hi Vladan thanks for posting but I am looking to change the 'Name' property of the member, not the LoginName (username). Is there a way to change this property. I cannot find any reference to change member name.
Hm, I see now. Using uSiteBuilder is not possible to accomplish this. You can probably use Umbraco Member API for this.
Hi,
I'm also looking for this functionalty. To be able to change the "display name".
Hi Razvan,
uSiteBuilder does not support this but I used the following:
Member umbMember = Member.GetCurrentMember();umbMember.Text = firstname + " " + lastname;umbMember.Save();
Member is of type umbraco.cms.businesslogic.member.
Hi Barry,
Thanks for the info. I ended up umbraco events to change the member name to the desired format.
public class Events : ApplicationBase { public Events() { umbraco.cms.businesslogic.member.Member.AfterSave += new umbraco.cms.businesslogic.member.Member.SaveEventHandler(Member_AfterSave); } void Member_AfterSave(umbraco.cms.businesslogic.member.Member sender, umbraco.cms.businesslogic.SaveEventArgs e) { var name = member.getProperty("name").Value.ToString(); if(Core.Helper.EmailIsValid(member.Text) && !string.IsNullOrEmpty(name)) { member.Text = name; member.Save(); } } }
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Change member name
Is there a way to change a member name (text) via the usitebuilder MemberTypeBase? I know I can do somehting like
umbraco.cms.businesslogic.member.Text = 'new member name'
but it would be nice not to have to instatiate the umbraco member class if I don't need to.
Any update on this, or should I just use the Umbraco API directly to accomplish this requirement?
Yes, sure it is possible as following:
myMember.LoginName = "newname";
myMember.Save(); (from version 1.2) or MemberHelper.Save(myMember);
Hi Vladan thanks for posting but I am looking to change the 'Name' property of the member, not the LoginName (username). Is there a way to change this property. I cannot find any reference to change member name.
Hm, I see now. Using uSiteBuilder is not possible to accomplish this. You can probably use Umbraco Member API for this.
Hi,
I'm also looking for this functionalty. To be able to change the "display name".
Hi Razvan,
uSiteBuilder does not support this but I used the following:
Member umbMember = Member.GetCurrentMember();
umbMember.Text = firstname + " " + lastname;
umbMember.Save();
Member is of type umbraco.cms.businesslogic.member.
Hi Barry,
Thanks for the info. I ended up umbraco events to change the member name to the desired format.
is working on a reply...