Getting other data from Membership Provider

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

Hi,

I am using a membership provider in .net 2.0 for all my customer login
etc.

I am using their email address as their username which
User.Identity.Name will give me.

I want the actual Id (which I have against each user in my database at
the PK) for my user though so that I can reference them for other
information. I don't really want to have to use the email as a lookup
everytime.

Could anyone tell me how to do this?

Thanks

Dave
 
Just been thinking and I guess what I am saying is that I want them to
use their email address as their username, but I want to store their
UserId as the Membership Provider name/Id.

Could anyone help?

Thanks

Dave
 
Here's some stuff I've used in a test page...

if (Page.User.Identity.Name != "")
{
Label1.Text = "<b>Membership.GetUser( ).ProviderUserKey: </b>"
+ Membership.GetUser( ).ProviderUserKey.ToString()
+ "<br />"
}


<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
 
Thanks for the response, but I was hoping to avoid making a second call
to get the Id. This seems like a step back from what I used to be able
to do.

Is the answer that I should be doing my membership stuff manually or
can the membership provider still do this?
 
AFIK that's as good as it gets and I don't see where you get "second call"
from.
First of all we need to determine if the user is logged in and if so then
get the ID.
That's as direct as it gets ainna?

<%= Clinton Gallagher
 
Back
Top