From 48805032c8bbcf45f65687c592438e2cc960ece8 Mon Sep 17 00:00:00 2001 From: Kjartan Mannes Date: Tue, 12 Aug 2003 20:37:16 +0000 Subject: - Applied modified version of almaw's 0064 patch: form item attributes. - Applied modified version of mathias' 0073 patch: node form name. $params["options"] is now an array so some contrib modules might need minor changes. - Applied mathhias' 0074 patch: missing access check on who is new block. --- modules/user.module | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'modules/user.module') diff --git a/modules/user.module b/modules/user.module index 9c51bd043..bd29d03cd 100644 --- a/modules/user.module +++ b/modules/user.module @@ -413,16 +413,18 @@ function user_block($op = "list", $delta = 0) { } break; case 2: - $result = db_query_range("SELECT uid, name FROM {users} WHERE status != '0' ORDER BY uid DESC", 0, 5); - while ($account = db_fetch_object($result)) { - $items[] = l((strlen($account->name) > 15 ? substr($account->name, 0, 15) . '...' : $account->name), "user/view/$account->uid"); - } + if (user_access("access content")) { + $result = db_query_range("SELECT uid, name FROM {users} WHERE status != '0' ORDER BY uid DESC", 0, 5); + while ($account = db_fetch_object($result)) { + $items[] = l((strlen($account->name) > 15 ? substr($account->name, 0, 15) . '...' : $account->name), "user/view/$account->uid"); + } - $output = theme("theme_user_list", $items); + $output = theme("theme_user_list", $items); - $block["subject"] = t("Who's new"); - $block["content"] = $output; - return $block; + $block["subject"] = t("Who's new"); + $block["content"] = $output; + return $block; + } } } } -- cgit v1.2.3