Wordpress - user_login vs. user_nicename
user_nicename
is url sanitized version of user_login
. In general, if you don't use any special characters in your login, then your nicename will always be the same as login. But if you enter email address in the login field during registration, then you will see the difference.
For instance, if your login is [email protected] then you will have userexample-com nicename and it will be used in author's urls (like author's archive, post permalink, etc).
Simple difference, user_login
is used to validate login to the site, while user_nicename
is used to create Author Permalink, Post Permalink
I wrote a blog post about WordPress names to document this. Here's the scoop:
- Username: column "user_login" from wp_users, this is what would typically be called a "user ID" in plain English.
- Nickname: metakey "nickname" from wp_usermeta. This is similar to a "handle" in various chat programs. It's preferred to display this field instead of wp_users.user_login if you need something other than a user's true name to identify someone.
- Column "user_nicename" from wp_users. This is the user_login converted to a WordPress "slug" for use in URLs.