Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Bo Kingo Damgaard 157 posts 456 karma points
    Jun 06, 2013 @ 08:21
    Bo Kingo Damgaard

    How to handle dupllicate email addresses in members


    I would like to hear any input to solving a challenge regarding duplicate emails not being allowed in Umbraco. It's preventet in both Member class and UmbracoMembershipProvider class, but I need to be able allow duplicate emails.

    I have a webpage for a sportsclub where kids can login, but they are to young to have an email adresse, and therefore they use their parents email. Even though I give them unique logins (membership number in the club), I can't create 2 kids with same email. And if the parent is a member to it's the same problem.

    How does anyone solve that problem?
    I've seen that MS MembershipProvider has the ability to allow for duplicate emails by setting RequiresUniqueEmail in web.config, but Umbraco ignores this. I could write a custom MembershipProvider, but still the Member class will get in the way.

    Kind regards


  • Dave Woestenborghs 3345 posts 11308 karma points MVP 6x admin c-trib
    Jun 06, 2013 @ 10:57
    Dave Woestenborghs

    I had a look at the umbraco source code for the membership provider.

    The property "requiresUniqueEmail" is implemented on the umbraco membership provider but isn't used at first sight.

    I see that in the method create user there is explicit check to see if a user with the e-mail adres exists.

    You can always create a new membership provider based on the existing one. But I don't know if the backoffice will keep working.

    Also how will you handle forgot password functionality when you have duplicate e-mails.


  • Bo Kingo Damgaard 157 posts 456 karma points
    Jun 07, 2013 @ 09:09
    Bo Kingo Damgaard

    Hi Dave

    You are right. The requiresUniqueEmail is "implemented" but not used. However the Member.MakeNew (which is called within the provider) function checks for duplicate email too and it's the only way to create the member. That would require me to rewrite the core or copy-n-paste the core code into my own code, which is a bit messy.

    For now the "forgot password" won't be nessesary, so thats fine.


  • Bo Kingo Damgaard 157 posts 456 karma points
    Jul 04, 2013 @ 08:43
    Bo Kingo Damgaard

    I solved it by fixing the core, working from 6.0.7/6.1.2


Please Sign in or register to post replies

Write your reply to: