Php 如何获取用户';Drupal中的配置文件路径?

Php 如何获取用户';Drupal中的配置文件路径?,php,drupal,drupal-6,Php,Drupal,Drupal 6,如何根据当前节点的作者在Drupal中获取用户的概要文件路径 <?php print t('Posted on !date by !username', array('!username' => theme('username', $node), '!date' => format_date($node->created,'custom','m.d.y'))); ?> 上面得到了正确的url,但这就是我想要的。。。url。$link=drupal\u get\

如何根据当前节点的作者在Drupal中获取用户的概要文件路径

<?php print t('Posted on !date by !username', array('!username' => theme('username', $node), '!date' => format_date($node->created,'custom','m.d.y'))); ?>


上面得到了正确的url,但这就是我想要的。。。url。

$link=drupal\u get\u path\u别名('user/'.$node->uid)


至少我认为这是最直接的。我相信还有一个更正确的答案

另外,我认为在你的主题模板中,$author是直接可用的。我无法获得author变量,但是,get_path_别名正是我想要的。谢谢!如果您使用此链接到用户页面(常见用例),您可以跳过drupal_get_path_别名,只需将user/#path传递给l(),它将为您转换为别名。如果您不需要使用l()的完整链接,则只需url()也可以为您获取$link=url('user/22323');