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
    0

    How to handle dupllicate email addresses in members

    Hi

    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

    Bo

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Jun 06, 2013 @ 10:57
    Dave Woestenborghs
    0

    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.

    Dave

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

    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

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

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

    /Bo

Please Sign in or register to post replies

Write your reply to:

Draft