Create user. Please, need advice on anonymous ...
- From: shapper <mdmoura@xxxxxxxxx>
- Date: Sat, 22 Nov 2008 09:57:45 -0800 (PST)
Hello,
I am creating a user following the steps:
Get User Anonymous Profile > Create User > Create User Profile > Copy
Anonymous Profile to User Profile > Delete User Anonymous Profile >
Send Confirmation Email
The user needs to confirm it's email to approve the account by
visiting the URL that is sent by email.
Until the account has been confirmed the user cannot login.
This is my code:
MembershipCreateStatus status;
ProfileHelper anonymous = ProfileHelper.GetProfile();
MembershipUser user = Membership.CreateUser(username, password,
email, null, null, false, null, out status);
if (user != null) {
ProfileHelper profile = ProfileHelper.GetProfile(username);
profile.Visitor = anonymous.Visitor;
AnonymousIdentificationModule.ClearAnonymousIdentifier();
profile.Save();
MailHelper.SendConfirmationEmail
}
ProfileHelper is a custom profile provider that works as following:
- Get an user profile given the username: ProfileHelper.GetProfile
(username);
- Get current user profile (if anonymous get anonymous profile. If
authenticated gets the authenticated profile): ProfileHelper.GetProfile
();
I am having only one error:
System.NotSupportedException: ClearAnonymousIdentifier is not
supported when the feature is disabled or the user is anonymous.
On the following code line:
AnonymousIdentificationModule.ClearAnonymousIdentifier();
Could someone help me to solve this?
Thanks,
Miguel
.
- Follow-Ups:
- Re: Create user. Please, need advice on anonymous ...
- From: shapper
- Re: Create user. Please, need advice on anonymous ...
- Prev by Date: Re: ASP.HttpProfile to be undefined
- Next by Date: Re: ASP.HttpProfile to be undefined
- Previous by thread: hyperlinks works with IE but not with Netscape
- Next by thread: Re: Create user. Please, need advice on anonymous ...
- Index(es):
Relevant Pages
|