From e2c206dafad9ba295fb3941db7a6f5c9d78a0f66 Mon Sep 17 00:00:00 2001
From: Kjartan Mannes <kjartan@2.no-reply.drupal.org>
Date: Sun, 28 Sep 2003 18:53:30 +0000
Subject: [PATCH] - Renamed User information block to Navigation. - Fixed
 Navigation block header.

---
 modules/user.module      | 14 ++++++--------
 modules/user/user.module | 14 ++++++--------
 2 files changed, 12 insertions(+), 16 deletions(-)

diff --git a/modules/user.module b/modules/user.module
index 5e25f4d9d9a3..d9169329f0cc 100644
--- a/modules/user.module
+++ b/modules/user.module
@@ -365,7 +365,7 @@ function user_block($op = "list", $delta = 0) {
 
   if ($op == "list") {
      $blocks[0]["info"] = t("User login");
-     $blocks[1]["info"] = t("User information");
+     $blocks[1]["info"] = t("Navigation");
      $blocks[2]["info"] = t("Who's new");
 
      return $blocks;
@@ -373,10 +373,7 @@ function user_block($op = "list", $delta = 0) {
   else {
     switch ($delta) {
       case 0:
-        if ($user->uid) {
-          $block["subject"] = $user->name;
-        }
-        else {
+        if (!$user->uid) {
           /*
           ** For usability's sake, avoid showing two login forms on one
           ** page.
@@ -426,10 +423,11 @@ function user_block($op = "list", $delta = 0) {
           $block["subject"] = t("User login");
           $block["content"] = "<div class=\"user-login-link\">$output</div>";
         }
-
-        $block["content"] .= "<div id=\"menu\">". menu_tree()."</div>";
         return $block;
-        break;
+      case 1:
+        $block["subject"] = $user->uid ? $user->name : t("Navigation");
+        $block["content"] = "<div id=\"menu\">". menu_tree() ."</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);
diff --git a/modules/user/user.module b/modules/user/user.module
index 5e25f4d9d9a3..d9169329f0cc 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -365,7 +365,7 @@ function user_block($op = "list", $delta = 0) {
 
   if ($op == "list") {
      $blocks[0]["info"] = t("User login");
-     $blocks[1]["info"] = t("User information");
+     $blocks[1]["info"] = t("Navigation");
      $blocks[2]["info"] = t("Who's new");
 
      return $blocks;
@@ -373,10 +373,7 @@ function user_block($op = "list", $delta = 0) {
   else {
     switch ($delta) {
       case 0:
-        if ($user->uid) {
-          $block["subject"] = $user->name;
-        }
-        else {
+        if (!$user->uid) {
           /*
           ** For usability's sake, avoid showing two login forms on one
           ** page.
@@ -426,10 +423,11 @@ function user_block($op = "list", $delta = 0) {
           $block["subject"] = t("User login");
           $block["content"] = "<div class=\"user-login-link\">$output</div>";
         }
-
-        $block["content"] .= "<div id=\"menu\">". menu_tree()."</div>";
         return $block;
-        break;
+      case 1:
+        $block["subject"] = $user->uid ? $user->name : t("Navigation");
+        $block["content"] = "<div id=\"menu\">". menu_tree() ."</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);
-- 
GitLab