Username Madness

View: New views
20 Messages — Rating Filter:   Alert me  
< Prev | 1 - 2 | Next >

Username Madness

by scribu :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Currently, in the wp_users table, there are 3 fields for the user name:

user_login
user_nicename
display_name

Besides those, we have two fields in wp_usermeta:

first_name
last_name


Instead of retaining a value, display_name should only remember the user
preference:

1 - user_login
2 - user_nicename
3 - first_name + last_name

with 2 as the default value.


Any thoughts?

--
http://scribu.net
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: Username Madness

by Glenn Ansley :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

+1 on this.
What about backwards compatibility?

On Tue, Nov 3, 2009 at 9:24 AM, scribu <scribu@...> wrote:

> Currently, in the wp_users table, there are 3 fields for the user name:
>
> user_login
> user_nicename
> display_name
>
> Besides those, we have two fields in wp_usermeta:
>
> first_name
> last_name
>
>
> Instead of retaining a value, display_name should only remember the user
> preference:
>
> 1 - user_login
> 2 - user_nicename
> 3 - first_name + last_name
>
> with 2 as the default value.
>
>
> Any thoughts?
>
> --
> http://scribu.net
> _______________________________________________
> wp-hackers mailing list
> wp-hackers@...
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: Username Madness

by Pete Mall :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It'll break every other plugin!

On Tue, Nov 3, 2009 at 6:49 AM, Glenn Ansley <glenn@...> wrote:

> +1 on this.
> What about backwards compatibility?
>
> On Tue, Nov 3, 2009 at 9:24 AM, scribu <scribu@...> wrote:
> > Currently, in the wp_users table, there are 3 fields for the user name:
> >
> > user_login
> > user_nicename
> > display_name
> >
> > Besides those, we have two fields in wp_usermeta:
> >
> > first_name
> > last_name
> >
> >
> > Instead of retaining a value, display_name should only remember the user
> > preference:
> >
> > 1 - user_login
> > 2 - user_nicename
> > 3 - first_name + last_name
> >
> > with 2 as the default value.
> >
> >
> > Any thoughts?
> >
> > --
> > http://scribu.net
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers@...
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >
> _______________________________________________
> wp-hackers mailing list
> wp-hackers@...
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: Username Madness

by Steven Rossi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes, please. Working with user stuff is a pain for this reason. As long as
it's backwards compatible (particularly for plugin developers), I'm all for
this. Thanks for getting it going.

Steven Rossi
http://www.letsmovetothemoon.com
http://www.stevenjrossi.com
http://www.twitter.com/supermoonman

On Tue, Nov 3, 2009 at 9:24 AM, scribu <scribu@...> wrote:

> Currently, in the wp_users table, there are 3 fields for the user name:
>
> user_login
> user_nicename
> display_name
>
> Besides those, we have two fields in wp_usermeta:
>
> first_name
> last_name
>
>
> Instead of retaining a value, display_name should only remember the user
> preference:
>
> 1 - user_login
> 2 - user_nicename
> 3 - first_name + last_name
>
> with 2 as the default value.
>
>
> Any thoughts?
>
> --
> http://scribu.net
> _______________________________________________
> wp-hackers mailing list
> wp-hackers@...
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: Username Madness

by Otto-19 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

-1. I see no benefit to this, and several downsides. Those three
fields do different things and so should contain different
information.

Also, what if I want my display_name to be something different? The
database doesn't have to be limited to only what the existing UI is
capable of.

-Otto



On Tue, Nov 3, 2009 at 8:24 AM, scribu <scribu@...> wrote:

> Currently, in the wp_users table, there are 3 fields for the user name:
>
> user_login
> user_nicename
> display_name
>
> Besides those, we have two fields in wp_usermeta:
>
> first_name
> last_name
>
>
> Instead of retaining a value, display_name should only remember the user
> preference:
>
> 1 - user_login
> 2 - user_nicename
> 3 - first_name + last_name
>
> with 2 as the default value.
>
>
> Any thoughts?
>
> --
> http://scribu.net
> _______________________________________________
> wp-hackers mailing list
> wp-hackers@...
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: Username Madness

by Thomas Belknap :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have to say that I've never seen any real problem with reconciling these
many fields. Yes, it's a bit strange the way it's laid out - never really
understood why display_name and first/last name are in different databases,
for example - but Otto is right in that they all serve different functions.

On Tue, Nov 3, 2009 at 10:17 AM, Otto <otto@...> wrote:

> -1. I see no benefit to this, and several downsides. Those three
> fields do different things and so should contain different
> information.
>
> Also, what if I want my display_name to be something different? The
> database doesn't have to be limited to only what the existing UI is
> capable of.
>
> -Otto
>
>
>
> On Tue, Nov 3, 2009 at 8:24 AM, scribu <scribu@...> wrote:
> > Currently, in the wp_users table, there are 3 fields for the user name:
> >
> > user_login
> > user_nicename
> > display_name
> >
> > Besides those, we have two fields in wp_usermeta:
> >
> > first_name
> > last_name
> >
> >
> > Instead of retaining a value, display_name should only remember the user
> > preference:
> >
> > 1 - user_login
> > 2 - user_nicename
> > 3 - first_name + last_name
> >
> > with 2 as the default value.
> >
> >
> > Any thoughts?
> >
> > --
> > http://scribu.net
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers@...
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >
> _______________________________________________
> wp-hackers mailing list
> wp-hackers@...
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: Username Madness

by scribu :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Nov 3, 2009 at 4:49 PM, Glenn Ansley <glenn@...> wrote:

> +1 on this.
> What about backwards compatibility?
>

The WP_User object could be populated in a backwards compatible way, so as
long as the plugin isn't accessing the database field directly, there should
be no problems.


On Tue, Nov 3, 2009 at 5:17 PM, Otto <otto@...> wrote:

> -1. I see no benefit to this, and several downsides.


How about the benefit of less redundancy?

Currently, when a user changes any of user_nicename, first_name or
last_name, the display_name has to be updated too.


Those three fields do different things and so should contain different
> information.


Exactly. Currently, display_name stores the same information as one of the
other fields.



> Also, what if I want my display_name to be something different?


You should use user_nicename instead, since that's what it's for.


--
http://scribu.net
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: Username Madness

by William Canino :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

My (real) first and last name is 'Bedžet Taseski'
My nickname is 'Bedžet the Russian'.
My user_login is 'admin' (cannot be changed)
My user_nicename is 'bedzet' (http://blog.com/author/bedzet)
My display_name is 'Bedžet the Russian' (output of the_author() )

Only nicename is guaranteed URL safe.  Also, some cultures write their
name as 'lastname + firstname'.

What is the confusion?

-1 on redefining display_name. Deprecate it, if you want. Don't redefine it.

Thank you,

W


2009/11/3 scribu <scribu@...>:

> Currently, in the wp_users table, there are 3 fields for the user name:
>
> user_login
> user_nicename
> display_name
>
> Besides those, we have two fields in wp_usermeta:
>
> first_name
> last_name
>
>
> Instead of retaining a value, display_name should only remember the user
> preference:
>
> 1 - user_login
> 2 - user_nicename
> 3 - first_name + last_name
>
> with 2 as the default value.
>
>
> Any thoughts?
>
> --
> http://scribu.net
> _______________________________________________
> wp-hackers mailing list
> wp-hackers@...
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: Username Madness

by Mike Schinkel-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> -1 on redefining display_name. Deprecate it, if you want. Don't  
> redefine it.

Agree.

Sent from my iPhone

On Nov 3, 2009, at 8:14 AM, William Canino <william.canino@...
 > wrote:

> My (real) first and last name is 'Bedžet Taseski'
> My nickname is 'Bedžet the Russian'.
> My user_login is 'admin' (cannot be changed)
> My user_nicename is 'bedzet' (http://blog.com/author/bedzet)
> My display_name is 'Bedžet the Russian' (output of the_author() )
>
> Only nicename is guaranteed URL safe.  Also, some cultures write their
> name as 'lastname + firstname'.
>
> What is the confusion?
>
> -1 on redefining display_name. Deprecate it, if you want. Don't  
> redefine it.
>
> Thank you,
>
> W
>
>
> 2009/11/3 scribu <scribu@...>:
>> Currently, in the wp_users table, there are 3 fields for the user  
>> name:
>>
>> user_login
>> user_nicename
>> display_name
>>
>> Besides those, we have two fields in wp_usermeta:
>>
>> first_name
>> last_name
>>
>>
>> Instead of retaining a value, display_name should only remember the  
>> user
>> preference:
>>
>> 1 - user_login
>> 2 - user_nicename
>> 3 - first_name + last_name
>>
>> with 2 as the default value.
>>
>>
>> Any thoughts?
>>
>> --
>> http://scribu.net
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers@...
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers@...
> http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: Username Madness

by Casey Bisson-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

We use WP at my university where the user_login and user_nicename (which is
used in URLs) is not changeable by the user. And the first and last name
fields are set from our central user directory, leaving users only the
display_name (nickname) field to enter an alternate.

A user's
real first and last name as well as nickname are each very important
to supporting good searchability of the data. The role of WordPress in
this for me is that I'm using it as the application platform upon
which we're building out a number of applications, including a
new directory search.

I don't care about the DB structure, but please don't eliminate
the independent profile field for nickname.

--Casey

Information Architect
Plymouth State University
http://Plymouth.edu
http://MaisonBisson.com
http://about.Scriblio.net


 On Tue, Nov 3, 2009 at 9:24 AM, scribu <scribu@...> wrote:

> Currently, in the wp_users table, there are 3 fields for the user name:
>
> user_login
> user_nicename
> display_name
>
> Besides those, we have two fields in wp_usermeta:
>
> first_name
> last_name
>
>
> Instead of retaining a value, display_name should only remember the user
> preference:
>
> 1 - user_login
> 2 - user_nicename
> 3 - first_name + last_name
>
> with 2 as the default value.
>
>
> Any thoughts?
>
> --
> http://scribu.net
> _______________________________________________
> wp-hackers mailing list
> wp-hackers@...
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: Username Madness

by scribu :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I missed a field. Here are all the fields involved:

In wp_users:

user_login - constant
user_nicename - URL safe
display_name - computed from other fields

In wp_usermeta: all are editable and optional:

nickname
first_name
last_name


So, correction:

Also, what if I want my display_name to be something different?
>
>
> You should use user_nicename instead, since that's what it's for.
>

You should use wp_usermeta.nickname instead of display_name.


Only nicename is guaranteed URL safe.  Also, some cultures write their
> name as 'lastname + firstname'.
>

As stated above, you can use wp_usermeta.nickname or a filter, and it won't
interfere with URLs either.


I don't care about the DB structure, but please don't eliminate
> the independent profile field for nickname.
>

Yeah, nickname won't be going anywhere.



> -1 on redefining display_name. Deprecate it, if you want. Don't redefine
> it.
>

The preference can be easily stored in the usermeta table.

But I'm wondering if this isn't a deliberate design choice, for better
performance - WPMU comes to mind.


--
http://scribu.net
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: Username Madness

by Otto-19 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>> Also, what if I want my display_name to be something different?
>
> You should use wp_usermeta.nickname instead of display_name.

No, because I have a nickname already. So, what if I want my display
name to be a fourth option? You're discounting customization and
plugins.

Forget the existing User Interface and how it works. Display name does
not have to be any of the three choices you make. It'll work just fine
if I manually set it to something else.

In other words, you're making the assumption that display_name must be
one of those three. That assumption is incorrect. It can be a fourth.
The fact that the core code only gives three options doesn't mean that
a fourth option cannot be created by external code.

The interface is not the database.

-Otto
Sent from Memphis, TN, United States
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: Username Madness

by scribu :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Nov 3, 2009 at 7:17 PM, Otto <otto@...> wrote:

> >> Also, what if I want my display_name to be something different?
> >
> > You should use wp_usermeta.nickname instead of display_name.
>
> No, because I have a nickname already. So, what if I want my display
> name to be a fourth option? You're discounting customization and
> plugins.
>
> Forget the existing User Interface and how it works. Display name does
> not have to be any of the three choices you make. It'll work just fine
> if I manually set it to something else.

In other words, you're making the assumption that display_name must be
> one of those three. That assumption is incorrect. It can be a fourth.
> The fact that the core code only gives three options doesn't mean that
> a fourth option cannot be created by external code.
>
> The interface is not the database.
>

Indeed: If you choose to completely ignore the user interface, you can use
display_name as yet another nickname.

But then, why not just use wp_usermeta to set as many nicknames as you want?


Then you could hook into 'the_author' and return one of them, instead of
display_name.


--
http://scribu.net
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: Username Madness

by Jeremy Clarke :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I think the current system is indeed messy but makes a lot of sense
and retroactively shunting it into plugin territory is a bad idea.

We have users who blog from places where they need to maintain their
anonymity for security reasons. They use display name to hold their
pseudonyms and first+last to hold their real names (useful for various
organizational reasons).

I don't think changing this is worth the problems it will cause. It's
not that hard to understand and as long as the workflow of using it is
well designed (which it currently is) very few people will actually
have problems with it.

--
Jeremy Clarke | http://jeremyclarke.org
Code and Design | http://globalvoicesonline.org
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: Username Madness

by William Canino :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Sorry, scribu. All is great now, IMO.

> But I'm wondering if this isn't a deliberate design choice, for better
> performance

Exactly.

display_name is what the fella or her site's admin wants displayed.
If it is First_name || Last_name || ' - CS Department' then it is so.
"SELECT display_name FROM wp_users" is fast and gives everyone and his
plugins what he expects.  No need for additional case statements or
JOINs or the_author filters or rewrites and all that.

If there is something superfluous in the list, it is wp_usermeta.nickname.

The next superfluous is user_login, if we go rewrite our installation
wizard and registration forms to ask and use the URL-safe nicename to
be the user's login name for WordPress.



2009/11/3 scribu <scribu@...>:

> I missed a field. Here are all the fields involved:
>
> In wp_users:
>
> user_login - constant
> user_nicename - URL safe
> display_name - computed from other fields
>
> In wp_usermeta: all are editable and optional:
>
> nickname
> first_name
> last_name
>
>
> So, correction:
>
> Also, what if I want my display_name to be something different?
>>
>>
>> You should use user_nicename instead, since that's what it's for.
>>
>
> You should use wp_usermeta.nickname instead of display_name.
>
>
> Only nicename is guaranteed URL safe.  Also, some cultures write their
>> name as 'lastname + firstname'.
>>
>
> As stated above, you can use wp_usermeta.nickname or a filter, and it won't
> interfere with URLs either.
>
>
> I don't care about the DB structure, but please don't eliminate
>> the independent profile field for nickname.
>>
>
> Yeah, nickname won't be going anywhere.
>
>
>
>> -1 on redefining display_name. Deprecate it, if you want. Don't redefine
>> it.
>>
>
> The preference can be easily stored in the usermeta table.
>
> But I'm wondering if this isn't a deliberate design choice, for better
> performance - WPMU comes to mind.
>
>
> --
> http://scribu.net
> _______________________________________________
> wp-hackers mailing list
> wp-hackers@...
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: Username Madness

by Jeremy Clarke :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Nov 3, 2009 at 1:35 PM, William Canino
<william.canino@...> wrote:
> The next superfluous is user_login, if we go rewrite our installation
> wizard and registration forms to ask and use the URL-safe nicename to
> be the user's login name for WordPress.

Yeah, that's definitely something weird. Am I the only person who
finds it very strange that WP allows capitalization in its login
names? What use is that? Should one site really be allowed to have a
login for "jeremy" and "Jeremy"?

--
Jeremy Clarke
Code and Design | globalvoicesonline.org
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: Username Madness

by Ken Newman-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 11/3/2009 2:11 PM, Jeremy Clarke wrote:

> On Tue, Nov 3, 2009 at 1:35 PM, William Canino
> <william.canino@...>  wrote:
>    
>> The next superfluous is user_login, if we go rewrite our installation
>> wizard and registration forms to ask and use the URL-safe nicename to
>> be the user's login name for WordPress.
>>      
> Yeah, that's definitely something weird. Am I the only person who
> finds it very strange that WP allows capitalization in its login
> names? What use is that? Should one site really be allowed to have a
> login for "jeremy" and "Jeremy"?
>
>    
I like the ability to use caps, and spaces (just figured that one out by
mistake), in user names. But I do get yer point, spoofing users' names
becomes less noticeable, readers could mistake lower jeremy for upper
Jeremy the admin, but I think that's a matter for admin review, not any
changes to the wordpress core.
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: Username Madness

by Otto-19 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Nov 3, 2009 at 12:11 PM, scribu <scribu@...> wrote:
> Indeed: If you choose to completely ignore the user interface, you can use
> display_name as yet another nickname.

No... you can choose to use it as the name that gets displayed. This
has nothing to do with "Nickname" whatsoever.

- My Nickname is a piece of information about me.
- My display_name is the name I want to be displayed.

These are not the same thing at all. They're not even close.

> But then, why not just use wp_usermeta to set as many nicknames as you want?

If I were to have more than one nickname, then yes, I'd put them all
in usermeta. The name of the table kinda gives it away, it's the place
where you put "meta" information about the "user".

I've been considering a custom avatar system, and I'd put them in
usermeta too (probably under "avatar"). If I was to make a field
called "phone number", then it'd probably go in usermeta too.

> Then you could hook into 'the_author' and return one of them, instead of
> display_name.

Well, that wouldn't make any sense. There's already a field to be
displayed for a user's name. Oddly enough, it's called "display_name".

Meta = information about information. User-meta is information about
the "user" that is defined as a row in the users table.

Let's try it this way: Information about a user that is needed often
(login name, email, display_name, etc) goes in the user table.
Information about a user that is not needed often (first/last names,
nickname, etc) goes in the usermeta table. If you prefer to think of
it as merely an optimization, then you'd be wrong, but if that helps
you cope with it, fine.

-Otto
Sent from Memphis, TN, United States
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: Username Madness

by Nikolay Bachiyski-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Nov 3, 2009 at 16:24, scribu <scribu@...> wrote:

> Currently, in the wp_users table, there are 3 fields for the user name:
>
> user_login
> user_nicename
> display_name
>
> Besides those, we have two fields in wp_usermeta:
>
> first_name
> last_name
>
>
> Instead of retaining a value, display_name should only remember the user
> preference:
>
> 1 - user_login
> 2 - user_nicename
> 3 - first_name + last_name
>
> with 2 as the default value.
>
>
> Any thoughts?
>

We should have only one editable field: display_name and get rid of
nickname and first/last name.

There are two many languages, in which the name pair doesn't make any
sense. Also, one field is better than three.

Happy hacking,
Nikolay.
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: Username Madness

by Martijn Engler :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> We should have only one editable field: display_name and get rid of
> nickname and first/last name.
>
Erh, no. I was looking for a separate first_name / last_name yesterday
(forgot it was in user_meta), because we want to sort on last name on
a certain page. That wouldn't be possible if they were together in one
field.
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers
< Prev | 1 - 2 | Next >