Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
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
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
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:
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,
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
is working on a reply...