K
kpg*
Hi all,
Trying to use the ASP.NET 2.0 membeship API to manage users
and user profiles, and of course, to provide role based security
to my web app.
I have several attributes I want to users, companyID for example,
so I'm using the profile feature to do this and it works great.
Now the problem:
My web app is used by several distincit groups of users as defined
by CompanyID. I want to have a page that lists all users associated
with a particular company.
So I want to write an object data source that returns all users
for a given companyID (which is stored in the profile table).
To do this I could query the user and profile tables directly, but
the profile data is stored as compound data in a single field - so
I'm not sure how to query that - there may well be some cool sql
mid string or regular expression function - I'm not a sql guru
I also thought I could loop through all users (membership.getallusers)
and pull out the onses I want (based on companyID) and throw them in a
datatable. Problem here is I don;t know how to load the profile for a
user that is not the logged in user. I could not find any membership
methods that seem to do that.
Bottom line: I want to have access to user and user profile information
for non-logged on users returnable in a datatable and in as an efficient
manner as possible.
Getting users seems to be easy (but not all that efficient?) but getting
profile information (the stuff I really want) is elusive.
Am I making this too complex? Do I need to loop through all the users,
get their unique id, use that to pull the data from the profile table,
then parse the data field to see if that user is of the desired compnayID?
(whew)
Thanks
kpg
Trying to use the ASP.NET 2.0 membeship API to manage users
and user profiles, and of course, to provide role based security
to my web app.
I have several attributes I want to users, companyID for example,
so I'm using the profile feature to do this and it works great.
Now the problem:
My web app is used by several distincit groups of users as defined
by CompanyID. I want to have a page that lists all users associated
with a particular company.
So I want to write an object data source that returns all users
for a given companyID (which is stored in the profile table).
To do this I could query the user and profile tables directly, but
the profile data is stored as compound data in a single field - so
I'm not sure how to query that - there may well be some cool sql
mid string or regular expression function - I'm not a sql guru
I also thought I could loop through all users (membership.getallusers)
and pull out the onses I want (based on companyID) and throw them in a
datatable. Problem here is I don;t know how to load the profile for a
user that is not the logged in user. I could not find any membership
methods that seem to do that.
Bottom line: I want to have access to user and user profile information
for non-logged on users returnable in a datatable and in as an efficient
manner as possible.
Getting users seems to be easy (but not all that efficient?) but getting
profile information (the stuff I really want) is elusive.
Am I making this too complex? Do I need to loop through all the users,
get their unique id, use that to pull the data from the profile table,
then parse the data field to see if that user is of the desired compnayID?
(whew)
Thanks
kpg