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?


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

<?php print $user_name; ?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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