Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

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
add comment

1 Answer 1

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 at 22:23
add comment

Your Answer

 
discard

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.