I'm new. I am doing a lot of testing for a project I've taken on that requires importing csv list of members. This testing requires removing the members from the database. The Our.Umbraco documentation for removing all members looked easst to implement using:
var memser = Services.MemberService;
memser.DeleteMembersOfType(????);
Thank you for your prompt answer. I suspect that other newbees would benefit if your answer was part of the documentation. I will humbly suggest adding your answer as an example to the documentation. If that was part of the current documentation, inexperienced persons like me would not be posting a question like this.
How do we get the MemberType ID?
I'm new. I am doing a lot of testing for a project I've taken on that requires importing csv list of members. This testing requires removing the members from the database. The Our.Umbraco documentation for removing all members looked easst to implement using:
The Umbraco documentation indicates:
"Deletes all members of a given type"
Nowhere can I find the function that returns the integer value of the "Members" MemberType.
As a workaround, using the Visual Studio the SQL Server Compact/SQLite Toolbox, I was able to find the value "1044" in the cmsMemberType table.
What code will return that integer value of a named MemberType?
Using the
MemberTypeService
- https://our.umbraco.org/documentation/reference/management/services/MemberTypeService :Thank you for your prompt answer. I suspect that other newbees would benefit if your answer was part of the documentation. I will humbly suggest adding your answer as an example to the documentation. If that was part of the current documentation, inexperienced persons like me would not be posting a question like this.
Thanks again.
is working on a reply...