Hooking into the membership model

T

Torben Frandsen

Hi

I'm building a new website where I'd like to use the built in membership
model and the controls that come with it. I'd like to do a bit more than
usual with it, so I'm hoping someone here can give me a few hints.

1) I'd like to register some additional information about the users of the
application, some of which should be persisted to the database and some
should be generated at run-time.

2) I'd like to register users as owners of certain objects.

My thoughts so far go in the direction of creating a table with a foreign
key to aspnet_Users.LoweredUserName and then writing a User class with all
my application specific stuff and a method that can populate it with data
from my table upon login.

Being new to 2.0, I can't really predict if I'm about to shoot myself in the
foot. What do you guys say?

Thanks,
Torben
 
B

Brock Allen

1) I'd like to register some additional information about the users of
the application, some of which should be persisted to the database and
some should be generated at run-time.

The CreateUserWizard allows you to define other steps for this additional
information. You can store that additional information via the Profile or
some other custom scheme. Don't attempt to save that extra info to the existing
tables for the membership providers.
2) I'd like to register users as owners of certain objects.

You can use Role based security to make users in certain roles, if that's
grainular enough for you. Otherwise some other solution might be right for
you, such as AuthorizationManager, perhaps. I'm sure others in this NG can
suggest more specifc ideas on this topic.

-Brock
http://staff.develop.com/balle
 

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,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top