The MembershipService.CreateMember(...) allowes duplicate emails and duplicate usernames. For this particular project I don't worry (yet) about duplicate emails. It are the duplicate usernames that bother me.
What are possible solutions
As far as I thought about it, while writing this post, I could come up with the following solutions:
adding a check for existing members on every possible place we are calling MemberService.CreateMember(...).
subscribing to the Events of the Member
implementing your own MembershipProvider/UserStore (the replacement of the old membership provider)
Objections against our own solutions
work because we are using the RestApi which calls the MemberService.CreateMember(...)
I think it's pretty difficult making unique constraints using Events when running in a loadbalanced environment.
Afraid of introducing new bugs.
So, dear reader, what is your view on this topic? Did you know duplicate usernames are allowed for your UmbracoMembers? Do you have solutions to solve this? Or maybe any experience you wish to share?
Finding a solution for duplicate usernames with members
I filled a new issue earlier today, about duplicate usernames in the members. Currently I am wondering about other solutions.
What is the problem?
The MembershipService.CreateMember(...) allowes duplicate emails and duplicate usernames. For this particular project I don't worry (yet) about duplicate emails. It are the duplicate usernames that bother me.
What are possible solutions
As far as I thought about it, while writing this post, I could come up with the following solutions:
Objections against our own solutions
So, dear reader, what is your view on this topic? Did you know duplicate usernames are allowed for your UmbracoMembers? Do you have solutions to solve this? Or maybe any experience you wish to share?
Looking forward hearing from you :)
Your humble servant
Damiaan
is working on a reply...