template_preprocess_user_profile

Versions
6 – 7
template_preprocess_user_profile(&$variables)

Process variables for user-profile.tpl.php.

The $variables array contains the following arguments:

  • $account

See also

user-profile.tpl.php

Code

modules/user/user.pages.inc, line 169

<?php
function template_preprocess_user_profile(&$variables) {
  $account = $variables['elements']['#account'];
  // Helpful $user_profile variable for templates.
  foreach (element_children($variables['elements']) as $key) {
    $variables['user_profile'][$key] = $variables['elements'][$key];
  }
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.