Copied to clipboard

Flag this post as spam?

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


  • Steen Tøttrup 191 posts 291 karma points c-trib
    Apr 19, 2012 @ 12:12
    Steen Tøttrup
    0

    Umb 4.6.1 - Member already exists, but doesn't

    Okay, so I started out using the Membership provider (the methods on Member are marked obsolete), doing this:

                MembershipUser user = Membership.Provider.CreateUser(username, password, emailAddress, string.Empty, string.Empty, true, null, out status);

    It worked nicely. Now all of a suddent it doesn't. A small note, the username is the same as the e-mail address.

    Now I can try with whatever e-mail address I want, but I always get a "member already exists". Obviously it doesn't.

    So to try and fix it, I went back to the old code,

                if (Member.GetMemberFromLoginName(username) == null) {
                    if (Member.GetMemberFromEmail(emailAddress) == null) {
                        MemberType memberType = MemberType.GetByAlias("ForumMedlem");
                        Member member = Member.MakeNew(username, emailAddress, memberType, User.GetUser(0));
                        member.Password = password;
                        member.Save();
                    }
                }

    But exactly same problem.

    I can create the member fine in the back-office.

    Any ideas? Any at all? Well, apart from upgrading the site to the latest.

    Thanks, Steen

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies