Drupal Answers is a question and answer site for Drupal developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to print out the name of the user that is currently logged in, but not have it be a link.

Currently I have:

<?php print l($user_name, 'user/' . $user->uid);?>

But this prints out a link to their user profile. Any way to make their name just text and not a link?

share|improve this question
up vote 1 down vote accepted

l() is the function that creates a link, so...

<?php print $user_name; ?>
share|improve this answer
Thanks Clive! That did it. – Dan Feb 16 '14 at 22:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.