Tokens syntax
In a hook_form_alter function, I am altering the location fields put in on the create new node page by the 'Location' module. I have the 'Token' module installed, and would like the default location values set using tokens. The basic concept is that every user will have some location set in his profile, again using the location module. When the user tries to create a new node, the node's location must default to the user's location.
Now I need to know what the token will be, to get the node's author's uid's location[0]'s 'name'. Basically, from what I have understood of the 'token_replace' function syntax, these tokens will fall under two categories, node and users. How do I retrieve the user id of the person currently logged in or making the post, then look up that uid's location tokens? Can someone give me a sample of what the arguments of the 'token_replace' function will be?
