Download & Extend

use "current user's name" instead of "My account" in secondary menu

Project:Drupal core
Version:7.x-dev
Component:user system
Category:task
Priority:normal
Assigned:sivaji
Status:closed (won't fix)
Issue tags:Needs usability review, Novice

Issue Summary

I thought it would be better to show current user's name instead of "my account" in secondary menu. I found function user_page_title in user.module already has statements to do this, but it does it's job in wrong manner (condition need to be reversed), i guess the actual statements suppose to be as below

function user_page_title($account) {
   if ($account->uid == $GLOBALS['user']->uid) {
-    return t('My account');
+    return t("@user's account", array('@user' => drupal_ucfirst($account->name)));
   }
-  return $account->name;
+  return t('My account');
}

Comments

#1

Attached is a patch which tries to fix this.

AttachmentSizeStatusTest resultOperations
drupal-530806-1.patch745 bytesIdleFailed: 11861 passes, 2 fails, 0 exceptionsView details | Re-test
after_patch.png11.36 KBIgnored: Check issue status.NoneNone
before_patch.png10.71 KBIgnored: Check issue status.NoneNone

#2

Status:needs review» needs work

The last submitted patch failed testing.

#3

I think that the patch is failing testing because of this OpenID test on line 153 of openid.test:

    $this->assertText(t('My account'), t('User was logged in.'));

Due to this change, "My account" no longer exists as text. I tried to fix it but got stuck. Looking forward to seeing the solution.

#4

This patch breaks breadcrumb in user/%/edit page.

#5

Status:needs work» needs review

Attached is a patch which tries to set proper title for secondary menu, user page and breadcrumb. Looking forward for input to fix the error mentioned in #3.

AttachmentSizeStatusTest resultOperations
drupal-530806-2.patch911 bytesIdleFailed: 11822 passes, 2 fails, 0 exceptionsView details | Re-test

#6

Status:needs review» needs work

The last submitted patch failed testing.

#7

Title:secondary menu uses "My account" title instead of "current user name" » use "current user's name" instead of "My account" in secondary menu
Category:bug report» task

changing issue properties.

#8

I think from a usability standpoint "My account" is better.

#9

I also think that Admin's account, actually makes it feel less personal and more abstract. I am tempted to mark this as a won't fix.

#10

I'm absolutely in favour of keeping this the way it is too.

#11

Status:needs work» closed (won't fix)

Won't fix it is then.

#12

Looks like it is fixed now. I see username in the secondary menu instead of "My account" :P.