Commit e1c749fa authored by Steven Wittens's avatar Steven Wittens
Browse files

#56930: Custom values fall through on user listing (tenrapid)

parent 1881ba04
......@@ -447,8 +447,8 @@ function profile_browse() {
$output = '<div id="profile">';
while ($account = db_fetch_object($result)) {
$account = user_load(array('uid' => $account->uid));
$fields = _profile_update_user_fields($fields, $account);
$output .= theme('profile_listing', $account, $fields);
$profile = _profile_update_user_fields($fields, $account);
$output .= theme('profile_listing', $account, $profile);
}
$output .= theme('pager', NULL, 20);
......@@ -693,9 +693,7 @@ function profile_form_profile($edit, $user, $category) {
*/
function _profile_update_user_fields($fields, $account) {
foreach ($fields as $key => $field) {
if ($value = profile_view_field($account, $field)) {
$fields[$key]->value = $value;
}
$fields[$key]->value = profile_view_field($account, $field);
}
return $fields;
}
......
......@@ -447,8 +447,8 @@ function profile_browse() {
$output = '<div id="profile">';
while ($account = db_fetch_object($result)) {
$account = user_load(array('uid' => $account->uid));
$fields = _profile_update_user_fields($fields, $account);
$output .= theme('profile_listing', $account, $fields);
$profile = _profile_update_user_fields($fields, $account);
$output .= theme('profile_listing', $account, $profile);
}
$output .= theme('pager', NULL, 20);
......@@ -693,9 +693,7 @@ function profile_form_profile($edit, $user, $category) {
*/
function _profile_update_user_fields($fields, $account) {
foreach ($fields as $key => $field) {
if ($value = profile_view_field($account, $field)) {
$fields[$key]->value = $value;
}
$fields[$key]->value = profile_view_field($account, $field);
}
return $fields;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment