[support] extracting author's UID from URL for use in a block
Fred Jones
fredthejonester at gmail.com
Wed Jun 25 09:20:05 UTC 2008
> I thought I could use args to extract the UID from the URL but when I print
> out all arguments in the block as a test, I get only "node" and "389" so
> it's not seeing the PathAuto URL but the system URL.
Correct.
To get the uid use node_load to load the node details. If you use
print_r() to examine the results, you will see that uid is one of the
entries in the returned array. So something like:
$node = node_load(arg(1));
$uid = $node['uid'];
HTH
More information about the support
mailing list