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

  • Thread starter Thread starter Jeff
  • Start date Start date
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
 
Use CreatingUser instead of CreatedUser. By this point in time, you have
already created the user.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*********************************************
Think outside the box!
*********************************************
 
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.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*********************************************
Think outside the box!
*********************************************
 
Back
Top