drupalprofilepathauto

Is there a way to output users name as a link to profile in Drupal?


Im using pathauto so user profiles have a clean URL in the format /user/name-name

How can I output the users name as a link to the profile? Ive seen the theme() function used to do stuff similar to this?


Solution

  • Use the l() function to create the link and make the link to user/uid. When using l, it will be converted to whatever you set it up to in pathauto.