Closed (works as designed)
Project:
me aliases
Version:
6.x-2.7
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
22 May 2007 at 12:46 UTC
Updated:
2 Jul 2011 at 01:22 UTC
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.
Comments
Comment #1
ahoeben commentedThis 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).
Comment #2
dklee commentedIs there any reason this module could not alias another word like 'self' and redirect that to the user name?
For some views I have setup, it is much more convenient and nice to have the user name as the argument.
I am having trouble figuring out how to make this work with pathauto since my views are not content types per se.
Comment #3
BManuel commentedWould be nice if this can be implemented for views. I definately need this feature for my website. I don't mind chipping in to
add this feature.
Thanks
BM
Comment #4
nohup commentedProject menu_token (http://drupal.org/project/menu_token) might help.
Comment #5
nohup commented