WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When you call the get_users() functions, a list of user objects are returned. Each of those users has a number of properties. What is the difference between user_login and user_nicename in those returned properties for each user? And which of those two properties are displayed in the URL? (I am asking because both properties are the same in my case!).

share|improve this question
up vote 11 down vote accepted

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 user@example.com then you will have userexample-com nicename and it will be used in author's urls (like author's archive, post permalink, etc).

share|improve this answer

Simple difference, user_login is used to validate login to the site, while user_nicename is used to create Author Permalink, Post Permalink

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.