Is there a module that changes the user URL from "user/1" to "user/username"?

up vote 14 down vote accepted

Pathauto does exactly that.

All new user aliases generated after enabling the module will look like users/[user:name] (obviously this could be changed in module configuration - Configuration / URL aliases / Patterns).

You can use "Bulk update" to generate aliases for already existing users (and other type of content).

You can use the PathAuto module to create an alias for every user.Your alias pattern would be able to include the username in its pattern. If you want the aliased path to be the primary url then you can also use GlobalRedirect to make user/id redirect to user/username

You can always use the Me Aliases module. It doesn't matter what user is logged in; they can use "user/me" to access their own accounts.

I am not sure if there's an individual module for that purpose, but I guess you could take a look at Drupal's url() method or hook_url_inbound_alter() to help your purpose.

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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