Copied to clipboard

Flag this post as spam?

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


  • Eddie Foreman 215 posts 288 karma points
    Aug 25, 2010 @ 10:42
    Eddie Foreman
    0

    Create members with the same name

    Hi All

    Created a member registration form and have noticed that I cannot create a member with the same name.  This also happens in the back-end.   Is it possible for me to amend the code to allow for mutiple members with the same name.  The from has been built using umbraco.cms.businesslogic.member.

    Thanks

    Eddie

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Aug 25, 2010 @ 10:45
    Matt Brailsford
    0

    Hey Eddie,

    You should be able to create multiple members witht he same display name, it's just the login name that has to be unique.

    Display Name = member.Text
    Login Name = member.LoginName

    Matt

  • Eddie Foreman 215 posts 288 karma points
    Aug 25, 2010 @ 10:53
    Eddie Foreman
    0

    Hi Matt

    Cool, thanks.

    Guess the best approach is to update the registration from and allow the member to create a login name?

    Eddie

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Aug 25, 2010 @ 11:02
    Matt Brailsford
    1

    Hi Eddie,

    In it's simplest form yea, I'd just get them to choose a login name.

    From a usability point of view though, I prefer to go with using the email as the login. In the past I've just generated a random login name knowing they won't use it, and just use some custom logic to do the login (I don't use the email as the actual username as it should be possible to change your email, without affecting any existing references to the member). You can still use the membership providers to do it aswell like so.

    string username = Membership.GetUserNameByEmail(Login1.UserName );
    if (username != null)
    {
     if (Membership.ValidateUser(username, Login1.Password))
     {
      ...
     }
    }

    Matt

  • Eddie Foreman 215 posts 288 karma points
    Aug 25, 2010 @ 11:24
    Eddie Foreman
    0

    Hi Matt

    Superb will go with the email address as the login name.

    Thanks again

    Eddie

Please Sign in or register to post replies

Write your reply to:

Draft