summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDries Buytaert2004-12-07 07:25:31 (GMT)
committer Dries Buytaert2004-12-07 07:25:31 (GMT)
commit6b529885782c8c36d81d438e08d62e99e435091a (patch)
treeedbc8b450e125ad2a4df954c4dd806f1348562c5
parent8c010f3f535f90f383993cbd9dff0443420802bd (diff)
- Patch #14006 by Neil:
* user/view/$n has been replaced with user/$n. * More blank lines in the right places. * Prevent unwanted case fallthrough.
-rw-r--r--modules/user.module14
1 files changed, 6 insertions, 8 deletions
diff --git a/modules/user.module b/modules/user.module
index c96ce1a..933b222 100644
--- a/modules/user.module
+++ b/modules/user.module
@@ -484,13 +484,8 @@ function user_block($op = 'list', $delta = 0) {
switch ($delta) {
case 0:
-
- if (!$user->uid) {
- // For usability's sake, avoid showing two login forms on one page.
- if (arg(0) == 'user' && arg(1) != 'view') {
- return;
- }
-
+ // For usability's sake, avoid showing two login forms on one page.
+ if (!$user->uid && !(arg(0) == 'user' && !is_numeric(arg(1)))) {
$edit = $_POST['edit'];
$output = "<div class=\"user-login-block\">\n";
@@ -524,12 +519,14 @@ function user_block($op = 'list', $delta = 0) {
$block['content'] = $output;
}
return $block;
+
case 1:
if ($menu = theme('menu_tree')) {
$block['subject'] = $user->uid ? $user->name : t('Navigation');
$block['content'] = '<div class="menu">'. $menu .'</div>';
}
return $block;
+
case 2:
if (user_access('access content')) {
$result = db_query_range('SELECT uid, name FROM {users} WHERE status != 0 ORDER BY uid DESC', 0, 5);
@@ -541,8 +538,9 @@ function user_block($op = 'list', $delta = 0) {
$block['subject'] = t('Who\'s new');
$block['content'] = $output;
- return $block;
}
+ return $block;
+
case 3:
if (user_access('access content')) {
// Count users with activity in the past defined period.