- Patch #9125 by Morbus: remove access users permission. Will bring it back later.

4.5.x
Dries Buytaert 2004-07-08 06:12:39 +00:00
parent d3904c05cc
commit 9a56e93c3d
2 changed files with 16 additions and 26 deletions

View File

@ -1141,22 +1141,17 @@ function user_view($uid = 0) {
} }
else { else {
if ($account = user_load(array('uid' => $uid, 'status' => 1))) { if ($account = user_load(array('uid' => $uid, 'status' => 1))) {
if (user_access('access users')) { // Retrieve and merge all profile fields:
// Retrieve and merge all profile fields: $fields = array();
$fields = array(); foreach (module_list() as $module) {
foreach (module_list() as $module) { if ($data = module_invoke($module, 'user', 'view', '', $account)) {
if ($data = module_invoke($module, 'user', 'view', '', $account)) { foreach ($data as $category => $content) {
foreach ($data as $category => $content) { $fields[$category] .= $content;
$fields[$category] .= $content;
}
} }
} }
}
print theme('page', theme('user_profile', $account, $fields), $account->name); print theme('page', theme('user_profile', $account, $fields), $account->name);
}
else {
drupal_access_denied();
}
} }
else { else {
drupal_not_found(); drupal_not_found();

View File

@ -1141,22 +1141,17 @@ function user_view($uid = 0) {
} }
else { else {
if ($account = user_load(array('uid' => $uid, 'status' => 1))) { if ($account = user_load(array('uid' => $uid, 'status' => 1))) {
if (user_access('access users')) { // Retrieve and merge all profile fields:
// Retrieve and merge all profile fields: $fields = array();
$fields = array(); foreach (module_list() as $module) {
foreach (module_list() as $module) { if ($data = module_invoke($module, 'user', 'view', '', $account)) {
if ($data = module_invoke($module, 'user', 'view', '', $account)) { foreach ($data as $category => $content) {
foreach ($data as $category => $content) { $fields[$category] .= $content;
$fields[$category] .= $content;
}
} }
} }
}
print theme('page', theme('user_profile', $account, $fields), $account->name); print theme('page', theme('user_profile', $account, $fields), $account->name);
}
else {
drupal_access_denied();
}
} }
else { else {
drupal_not_found(); drupal_not_found();