Anyway to Specify the User's Name with Membership?

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.
 
E

Eliyahu Goldin

I usually add another table user_details and join it with aspnet_Users on
UserId.
 
K

Kevin Spencer

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.
 
J

Jonathan Wood

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.
 
E

Eliyahu Goldin

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.
 
J

Jonathan Wood

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.
 

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

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,129
Latest member
FastBurnketo
Top