Anyway to Specify the User's Name with Membership?

  • Thread starter Thread starter Jonathan Wood
  • Start date Start date
J

Jonathan Wood

Is there any way to specify a user's name using ASP.NET membership?

I know there is a UserName property but that's a unique login name, and not
ideal for the user's actual name. (Also, I'm going to use emails for the
username.)

Thanks for any suggestions.
 
I usually add another table user_details and join it with aspnet_Users on
UserId.
 
If you implement your own Membership Provider derived class and database,
you can add any columns and/or tables you want to, as well as any methods
you wish to add to the base class.

--
HTH,

Kevin Spencer
Chicken Salad Surgeon
Microsoft MVP

Eliyahu Goldin said:
I usually add another table user_details and join it with aspnet_Users on
UserId.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin


Jonathan Wood said:
Is there any way to specify a user's name using ASP.NET membership?

I know there is a UserName property but that's a unique login name, and not
ideal for the user's actual name. (Also, I'm going to use emails for the
username.)

Thanks for any suggestions.
 
Yeah, I'm doing something similar, although I wasn't sure the best way. By
join, do you mean you'll create a relationship between the two tables?

Originally, I thought maybe the user's name would already be part of the
existing membership logic.

Thanks.

--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com


Eliyahu Goldin said:
I usually add another table user_details and join it with aspnet_Users on
UserId.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin


Jonathan Wood said:
Is there any way to specify a user's name using ASP.NET membership?

I know there is a UserName property but that's a unique login name, and not
ideal for the user's actual name. (Also, I'm going to use emails for the
username.)

Thanks for any suggestions.
 
No, I mean just joining tables in the from clause like

select u1.LastName, u1.FirstName, a1.UserName
from aspnet_Users a1 inner join user_Details u1
on a1.UserId=u1.UserId



--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


Jonathan Wood said:
Yeah, I'm doing something similar, although I wasn't sure the best way. By
join, do you mean you'll create a relationship between the two tables?

Originally, I thought maybe the user's name would already be part of the
existing membership logic.

Thanks.

--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com


Eliyahu Goldin said:
I usually add another table user_details and join it with aspnet_Users on
UserId.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin


Jonathan Wood said:
Is there any way to specify a user's name using ASP.NET membership?

I know there is a UserName property but that's a unique login name, and not
ideal for the user's actual name. (Also, I'm going to use emails for the
username.)

Thanks for any suggestions.
 
Okay, so you just mean to create the join when querying the database so that
the data is all together.

Great. Thanks for the clarification. This is probably what I'll be doing.

--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com

Eliyahu Goldin said:
No, I mean just joining tables in the from clause like

select u1.LastName, u1.FirstName, a1.UserName
from aspnet_Users a1 inner join user_Details u1
on a1.UserId=u1.UserId



--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


Jonathan Wood said:
Yeah, I'm doing something similar, although I wasn't sure the best way.
By join, do you mean you'll create a relationship between the two tables?

Originally, I thought maybe the user's name would already be part of the
existing membership logic.

Thanks.

--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com


Eliyahu Goldin said:
I usually add another table user_details and join it with aspnet_Users on
UserId.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin


Is there any way to specify a user's name using ASP.NET membership?

I know there is a UserName property but that's a unique login name, and
not
ideal for the user's actual name. (Also, I'm going to use emails for
the
username.)

Thanks for any suggestions.
 
Back
Top