in my Project i need to define 3 roles :
- SuperAdmin
- Admin
- RegisteredMembers
I also have Table which named "Users" that stores information such as:
- fristName
- lastName
- Birthday
- Username
- Password . . . and etc
How can i make Roles recognize which user is for which Role when users try to log on to website?
First of all you creating a
Users
table is just the first step. You also need aRole
table and aUserRole
many-to-many relationship table to store which user belongs to which role(In a simple scenario).That's for the database part of the whole concept.
Then, on the code side...since you're providing different tables than the ones in the AspNetMembership you need to also implement a custom membership provider, custom role provider and presumably a custom membership user.