user.IsApproved = false; is NOT working, what am I doing wrong????

J

Jeff

ASP.NET 2.0

The code below is triggered by OnCreatedUser from the CreateUserWizard in my
website. The problem is that user.IsApproved = false; don't set
user.IsApproved to false. After I've created a user I can check in "ASP.NET
Configration" that this user is active. I want the IsApproved to be false
and send an email to the user so he can confirm his identity....

Any suggestions why user.IsApproved = false; is not working????


protected void CreatedUser(object sender, EventArgs e)
{
MembershipUser user =
Membership.GetUser(CreateUserWizard1.UserName);
user.IsApproved = false;
}

Jeff
 
C

Cowboy \(Gregory A. Beamer\)

Use CreatingUser instead of CreatedUser. By this point in time, you have
already created the user.
 
C

Cowboy \(Gregory A. Beamer\)

That works too, but you can use the original method if you use it before the
user is actually created. The event is Creating User not Created User.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top