diff --git a/modules/user.module b/modules/user.module index 9e36b313e7412d45598ed5eca9ee72a02b01d907..8570b465f5ad29eb7b0c50f8363f1201ce19267b 100644 --- a/modules/user.module +++ b/modules/user.module @@ -1141,22 +1141,17 @@ function user_view($uid = 0) { } else { if ($account = user_load(array('uid' => $uid, 'status' => 1))) { - if (user_access('access users')) { - // 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; - } + // 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; } } - - print theme('page', theme('user_profile', $account, $fields), $account->name); - } - else { - drupal_access_denied(); } + + print theme('page', theme('user_profile', $account, $fields), $account->name); } else { drupal_not_found(); diff --git a/modules/user/user.module b/modules/user/user.module index 9e36b313e7412d45598ed5eca9ee72a02b01d907..8570b465f5ad29eb7b0c50f8363f1201ce19267b 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -1141,22 +1141,17 @@ function user_view($uid = 0) { } else { if ($account = user_load(array('uid' => $uid, 'status' => 1))) { - if (user_access('access users')) { - // 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; - } + // 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; } } - - print theme('page', theme('user_profile', $account, $fields), $account->name); - } - else { - drupal_access_denied(); } + + print theme('page', theme('user_profile', $account, $fields), $account->name); } else { drupal_not_found();