Author Pane user picture (avatar)
Author Pane deliberately does not use the theme_user_picture() function for displaying the user picture (avatar) to allow greater control over it in specific pane instances. Instead, it uses the function author_pane_user_picture($account, $caller, $picture_preset) which is called from template_preprocess_author_pane() to get the user picture formatted to display on that pane instance.
Parameters:
- $account - The fully loaded user object. If all you have is a UID, you can get the object with
$account = user_load($uid);where $uid is a variable holding the user id. - $caller - (optional) This ID comes from the preprocess_author_pane and is passed through as a way to track who is calling the function. By checking the $caller, you could, for example, link the avatar on forum posts but not on the user profile page. (This is an example and is not actually implemented.)
- $picture_preset - (optional) This is an imagecache picture preset that, if given, and if imagecache is enabled, will be used to size the user picture on the author pane instance.
You generally will not need to call this function on your own as it is already called from within template_preprocess_author_pane() . Because this is a template based theme function, however, you can hook into it via the preprocess system. This way you can make changes either globally or based on $caller without having to hack the module code.
