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 that's all i want... the url.
Installation profiles are like modules Installation profiles in Drupal have all the functionality of modules, including access to hooks and plugins and, critically, the ability to provide configuration for your site in the form of . yml files.
Every visitor to your site, whether they have an account and log in or visit the site anonymously, is considered a user to Drupal. Every user also has a numeric user ID special to the type of user. If a user is not logged in, then the user is considered an Anonymous user having user ID 0.
$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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With