Theming a Drupal User Profile is actually much easier than you think. Follow these few simple steps and you will be on your way to a fully customized user profile for your Drupal site.

This article assumes that you know how to theme a node, if not, first read Theming a node in Drupal...The Easy Way.

There are two main ways to get custom field into the user profile, content profile or using the core user profile that ships with Drupal. If you just want simple fields the core module is the way to go. For the sake of this article I will be using the core user profile module.

Using 6.x go to http://www.yoursite.com/admin/user/profile, there you can set up a couple of fields to your liking.

Next make a new document called user-profile.tpl.php similar to the node-custom.tpl.php this overrides the user-profile.tpl.php that is found in the core user module. The benefit being you won't be editing the core module file.

Once you have that file made copy this code into the document:

<pre><?php print_r($account)?></pre>



Also similar to the custom node override you are printing the field information that you just set up in the user profile.
Save the document and upload it to your server. Check out your account at http://www.yoursite.com/user
You will now see a print out similar to this.
Similar to the node override you will print the fields that you want. For example:

<?php print $account->profile_name ?>



That will print the field Name that you set up in the User Profile. Continue this until you have successfully printed all your fields then use css to position them to your hearts desire.

Soon I will post an article on theming an advanced user profile. Subscribe now to make sure you don't miss it.