** I figured it out. I just had to use memberservice instead of the profilemodel. Not sure why it doesn't update the username/loginame upon updating memberprofile.
I'm trying to update a currently logged in member, but the loginname/username is not updated in the backoffice.
var profileModel = _memberHelper.GetCurrentMemberProfileModel();
As far as i know, the username property should reflect the loginname?
I would like to add, that i also tried to update the member directly with the memberservice, but that results in a logout of the currentmember, which i am not interested in.
I've searched for a few hours with no luck. Help is much appreciated :)
It seems, that it is not possible to fetch current member from the same umbracocontext with memberHelper, when saving the user with memberservice. It somewhat makes sense, that the currentMember won't be available in the current context after updating the member, as the currentMember would no longer exist.
I've made another post addressing the other issue, with what i've attempted.
Updating memberprofile (loginname not updated)
** I figured it out. I just had to use memberservice instead of the profilemodel. Not sure why it doesn't update the username/loginame upon updating memberprofile.
I'm trying to update a currently logged in member, but the loginname/username is not updated in the backoffice.
var profileModel = _memberHelper.GetCurrentMemberProfileModel();
profileModel.Name = currentMember.Email;
profileModel.Email = currentMember.Email;
profileModel.UserName = currentMember.Email;
_memberHelper.UpdateMemberProfile(profileModel);
As far as i know, the username property should reflect the loginname?
I would like to add, that i also tried to update the member directly with the memberservice, but that results in a logout of the currentmember, which i am not interested in.
I've searched for a few hours with no luck. Help is much appreciated :)
Hi DitlevHB,
Did you try to use MemberService ?
http://24days.in/umbraco/2014/dealing-with-members/
https://our.umbraco.org/documentation/Reference/Management-v6/Services/MemberService
THanks
Yes i have and the issue persists.
It seems, that it is not possible to fetch current member from the same umbracocontext with memberHelper, when saving the user with memberservice. It somewhat makes sense, that the currentMember won't be available in the current context after updating the member, as the currentMember would no longer exist.
I've made another post addressing the other issue, with what i've attempted.
https://our.umbraco.org/forum/developers/api-questions/63589-Updating-member-through-clientside-calls-to-API
is working on a reply...