Support option for name instead of uid
kylehase - May 22, 2007 - 12:46
| Project: | me aliases |
| Version: | 5.x-1.0 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | by design |
Jump to:
Description
Suggest an option for using username instead of uid. I've changed
$destination.=(($destination=='')?'':'/').(($fragment=='me')?$user->uid:$fragment);
to
$destination.=(($destination=='')?'':'/').(($fragment=='me')?$user->name:$fragment);
as a temporary workaround.

#1
This will not work reliably.
This module 'blindly' replaces 'me' with the uid. The 'beauty' of this module is that if you specify 'user/me' as a valid alias, it will work for 'user/me/edit', 'user/me/contact', 'user/me/edit/Personal+information', etc. Unless you make aliases for all these cases, your suggestion breaks all that.
If you want to see usernames instead of user ids, I suggest you use a combination of this module, Pathauto to generate path aliases, and Global Redirect. Global Redirect will ensure that - provided there's a url alias for a page - the url alias will show instead (even if you typed in the url).