OK, this may be harder to understand if I explain it in general terms, so here's what I'm specifically trying to do: I want to be able to create a link in a story that says something like "Visit the [my account] section to update your profile!", and I want [my account] to link straight to the profile edit page at http://www.mysiteURL.org/?q=user/[users's id #]/edit.
So my question is how to create links that use the current user's id #? Obviously static links are really easy, e.g.
http://www.mysiteURL.org/?q=user/1/edit
http://www.mysiteURL.org/?q=user/231/edit
http://www.mysiteURL.org/?q=user/125/edit
etc.
but the point is that there is no way I can know the user's # ahead of time. So is there some way to create links that use the current user's id #? Thanks.
Comments
Use the PHP input format
and then you could do something like this:
The if-test makes sure the link is only displayed to logged in users (it doesn't make sense to redirect anonymous users to user/0/edit...
Thanks a lot!
Works great.
And what if I want to do
And what if I want to do this as on of my primary links?
then u can use this module
http://drupal.org/project/me
kind of late i know hehe