Instead of /user/(uid) for user pages, display as /user/(username)

Comments

adrian’s picture

Spaces are allowed in user names , and i can already see a lot of broken links.

However, i do intend to work on functionality like this soon.

ie: http://drupalsite.org/user/Some User.

this will especially mess with certain filters.

matt westgate’s picture

This could easily be implemented with the new url aliasing features. While the current cvs doesn't allows spaces in the URIs, i manually inserted a "spaced alias" in my database and it had no problem rendering the correct page. As soon as the alias hits the url() it's translated back to drupal's default path, so i think we are able to circumvent any filter problems.

In my opinion, this might be nice usability feature to have drupal do these mappings by default. It definately feels more personal and intuitive for accessing user info and blog links.

Boris Mann _Old Blogger.com Account_’s picture

I would think that replacing spaces with something like an "_" underscore would a) look better and b) break less.

Spaces in URIs is against spec, I believe. The other option is just encoding with %20 or whatever the space character is. Actually, that might be the best way -- catches all the other characters that might get mangled by a browser.

CodeMonkeyX’s picture

Also if a user changes their username they will break any external, or perm link to that profile.

gábor hojtsy’s picture

urlencode() user names and they will be able to go into URLs (will not be nice though). We allow people to have accented chars in their user names, which definitely need to be encoded...

Eric Scouten’s picture

Status: Active » Closed (won't fix)

Probably not appropriate for core.

New pathauto.module does this.