How do I print a username of current profile? I am making a profile page for users on my site, and would like to print out their username. If I do print $user-&gt;name it will just print out the username of the currently logged in user, I want the username of the profile I am looking at.
Thanks.
It depends on how you build the profile page (which modules you use), but usually you will get the user info on profile templates by accessing $account, while $user is the logged in user.

So, in short, $account-&gt;name should be what you are after. Again, this depends on how you create the profile page. For a profile page built with Views, this would not help, but you could add the name in the View itself.