user_view
- Versions
- 4.6 – 5
user_view($uid= 0)- 6
user_view($account)
Code
modules/user.module, line 1209
<?php
function user_view($uid = 0) {
global $user;
if ($account = user_load(array('uid' => $uid, 'status' => 1))) {
// Retrieve and merge all profile fields:
$fields = array();
foreach (module_list() as $module) {
if ($data = module_invoke($module, 'user', 'view', '', $account)) {
foreach ($data as $category => $content) {
$fields[$category] .= $content;
}
}
}
drupal_set_title(check_plain($account->name));
print theme('page', theme('user_profile', $account, $fields));
}
else {
drupal_not_found();
}
}
?>Login or register to post comments 