user_build_content

Versions
6
user_build_content(&$account)
7
user_build_content($account, $build_mode = 'full')

Builds a structured array representing the profile content.

Parameters

$account A user object.

$build_mode Build mode, e.g. 'full'.

▾ 1 function calls user_build_content()

user_build in modules/user/user.module
Generate an array for rendering the given user.

Code

modules/user/user.module, line 2126

<?php
function user_build_content($account, $build_mode = 'full') {
  // Remove previously built content, if exists.
  $account->content = array();

  // Build fields content.
  field_attach_prepare_view('user', array($account->uid => $account), $build_mode);
  $account->content += field_attach_view('user', $account, $build_mode);

  // Populate $account->content with a render() array.
  module_invoke_all('user_view', $account, $build_mode);
}
?>
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.