Set profile Active/Inactive using ASP.NET Profiles
Using the built-in ASP.NET Web Profi开发者_开发知识库les, how do I create a user account that is Inactive (i.e., Active == false) and then later (for example, after sending the user an activation link in an e-mail) set their profile to Active?
Thanks, Jay
Take a look at the IsApproved
property of the MembershipUser
class here.
If IsApproved
is set to false, validation for the user will fail even if the the username and password are correct.
精彩评论