I have the same problem too. Using VS 2022's decompiler, I was able to look at the code for CreateMemberWithIdentity and saw what seems to be an obvious bug:
These methods are within the MemberService class. Since I'm using dependency injection, I was calling the methods exposed by the IMemberService interface. The first method can be called in my code, but the other two overloaded methods shown here, though they are public, are not exposed via the interface and thus, can't be called in my code.
The first method calls one of the overloaded methods below but passes string.Empty instead of the value of the "name" parameter. That is the cause of the issue.
To get around this, I instantiated the MemberService class (I needed to provide all the necessary services for the constructor) and called the overloaded method that works properly. It's not ideal, but it'll have to do until Umbraco fixes that bug. If someone else has a better solution, please post it.
CreateMemberWithIdentity doesn't work in V10.1.0
Hi,
After update umbraco from 10.0.1 to 10.1.0 I've got exception when use CreateMemberWithIdentity method.
email and FullName are not empty.
ArgumentException: Cannot save member with empty name. Umbraco.Cms.Core.Services.MemberService.Save(IMember member).
Irina
I have the same problem too. Using VS 2022's decompiler, I was able to look at the code for CreateMemberWithIdentity and saw what seems to be an obvious bug:
These methods are within the MemberService class. Since I'm using dependency injection, I was calling the methods exposed by the IMemberService interface. The first method can be called in my code, but the other two overloaded methods shown here, though they are public, are not exposed via the interface and thus, can't be called in my code.
The first method calls one of the overloaded methods below but passes string.Empty instead of the value of the "name" parameter. That is the cause of the issue.
To get around this, I instantiated the MemberService class (I needed to provide all the necessary services for the constructor) and called the overloaded method that works properly. It's not ideal, but it'll have to do until Umbraco fixes that bug. If someone else has a better solution, please post it.
is working on a reply...