I'm using ASP.NET MVC 4 with SimpleMembership. When I call WebSecurity.UserExists()
for a specific user, it is returning true. However, the given user exists in the profile table but does not exist in the membership table.
The online documentation for this function has contradicting statements about the 2 tables. On one hand, it says
Returns a value that indicates whether the specified user exists in the membership database.
Then later it says
true if the username exists in the user profile table; otherwise, false.
I am maintaining my own user profile table, and letting SimpleMembership build and maintain its own membership table (webpages_Membership). The user in question exists in my profile table, but NOT in webpages_Membership.
I want users to self-register, but only allow people with a record in the profile table to do that. This user, therefore, exists in the profile table, but is not yet registered. When a user attempts to register, I want to be able to check that they DO have a record in the profile table, but this function isn't doing what I expect it to. And, more troubling, the documentation is unclear on whether it checks the profile table or the membership table.