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
I am trying to get at the customer related to the current logged in Umbraco member.
umbraco.cms.businesslogic.member.Member loUmbracoMember = umbraco.cms.businesslogic.member.Member.GetCurrentMember();
int liMemberID = loUmbracoMember.Id;
Customer currentCustomer = Customer.Get(liMemberID);
I have checked that a customer is definitely present for the member id however no customer is being returned from the Get method.
Does anyone know what I am doing wrong?
Cheers,
Marc
Solved. Should have been using:
Customer currentCustomer = Customer.ForMember(liMemberID.ToString());
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Retrieving customer from current Umbraco member
I am trying to get at the customer related to the current logged in Umbraco member.
umbraco.cms.businesslogic.member.Member loUmbracoMember = umbraco.cms.businesslogic.member.Member.GetCurrentMember();
int liMemberID = loUmbracoMember.Id;
Customer currentCustomer = Customer.Get(liMemberID);
I have checked that a customer is definitely present for the member id however no customer is being returned from the Get method.
Does anyone know what I am doing wrong?
Cheers,
Marc
Solved. Should have been using:
Customer currentCustomer = Customer.ForMember(liMemberID.ToString());
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.