开发者

How do I get a user's profile path in Drupal?

开发者 https://www.devze.com 2023-01-18 00:34 出处:网络
How do I get a user\'s profile path in Drupal based on the author of the current node? <?php print t(\'Posted on !date by !username\', array(\'!username\' => theme(\'username\', $node), \'!date

How do I get a user's profile path in Drupal based on the author of the current node?

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

The above gets me the right url, but开发者_如何学C that's all i want... the url.


$link = drupal_get_path_alias('user/' . $node->uid);

At least I think that's the most direct. I'm sure there's a more correct answer though.

0

精彩评论

暂无评论...
验证码 换一张
取 消