Everything seems to work well, have advanced profile module installed, except I get an error message when users look at my admin user profile. It says: warning: Invalid argument supplied for foreach() in /home/admin/public_html/modules/user/user.module on line 1519.
The code around there reads:
function user_view($uid = 0) {
global $user;
$account = user_load(array('uid' => $uid));
if ($account === FALSE || ($account->access == 0 && !user_access('administer users'))) {
return drupal_not_found();
}
// 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 => $items) {
foreach ($items as $key => $item) {
$item['class'] = "$module-". $item['class'];
$fields[$category][$key] = $item;
}
}
}
}
The warning does not come up when I view the user account through admin, only other users. Anyone know how to fix this? Or a way to block the admin from coming up in profile searches? Thanks so much.