Finding the right function to use to theme an object
In the previous chapter, we saw how to find out which theme function is being used to theme an element—the username—in a page and, subsequently, learned to override it. However, while writing modules, or when we are looking at ways to render data loaded from the database, it is also not uncommon to be at a loss to know which function to use to theme a Drupal object.
In this recipe, we will look to source potential solutions which can be used to render a typical Drupal user object. We will be accomplishing this task using the Devel module and available documentation.
Getting ready
The Devel module which can be downloaded from http://drupal.org/project/devel is assumed to be installed and enabled. Furthermore, it is required that the access devel information and execute php code permissions be assigned to the current user.
The Development block which is provided by the module, also needs to be enabled.
How to do it...
Since we are looking to theme...