user-picture.tpl.php

  1. 7.x drupal-7.x/modules/user/user-picture.tpl.php
  2. 6.x drupal-6.x/modules/user/user-picture.tpl.php

Default theme implementation to present a picture configured for the user's account.

Available variables:

  • $user_picture: Image set by the user or the site's default. Will be linked depending on the viewer's permission to view the user's profile page.
  • $account: Array of account information. Potentially unsafe. Be sure to check_plain() before use.

See also

template_preprocess_user_picture()

6 theme calls to user-picture.tpl.php
template_preprocess_comment in drupal-7.x/modules/comment/comment.module
Process variables for comment.tpl.php.
template_preprocess_node in drupal-7.x/modules/node/node.module
Processes variables for node.tpl.php
template_preprocess_profile_block in drupal-7.x/modules/profile/profile.module
Process variables for profile-block.tpl.php.
template_preprocess_profile_listing in drupal-7.x/modules/profile/profile.module
Process variables for profile-listing.tpl.php.
user_account_form in drupal-7.x/modules/user/user.module
Helper function to add default user account fields to user registration and edit form.

... See full list

File

drupal-7.x/modules/user/user-picture.tpl.php
View source
  1. <?php
  2. /**
  3. * @file
  4. * Default theme implementation to present a picture configured for the
  5. * user's account.
  6. *
  7. * Available variables:
  8. * - $user_picture: Image set by the user or the site's default. Will be linked
  9. * depending on the viewer's permission to view the user's profile page.
  10. * - $account: Array of account information. Potentially unsafe. Be sure to
  11. * check_plain() before use.
  12. *
  13. * @see template_preprocess_user_picture()
  14. *
  15. * @ingroup themeable
  16. */
  17. ?>
  18. <?php if ($user_picture): ?>
  19. <div class="user-picture">
  20. <?php print $user_picture; ?>
  21. </div>
  22. <?php endif; ?>

Related topics