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

sivaji - July 25, 2009 - 18:07
Project:Drupal
Version:7.x-dev
Component:user system
Category:task
Priority:normal
Assigned:sivaji
Status:won't fix
Issue tags:Needs usability review, Novice
Description

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');
}

#1

sivaji - July 25, 2009 - 18:20

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 KBIgnoredNoneNone
before_patch.png10.71 KBIgnoredNoneNone

#2

System Message - July 25, 2009 - 19:10
Status:needs review» needs work

The last submitted patch failed testing.

#3

JuliaKM - July 26, 2009 - 01:46

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

sivaji - August 2, 2009 - 19:17

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

#5

sivaji - August 3, 2009 - 19:01
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

System Message - August 3, 2009 - 19:22
Status:needs review» needs work

The last submitted patch failed testing.

#7

sivaji - August 8, 2009 - 13:26
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

alexanderpas - August 11, 2009 - 00:22

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

#9

Bojhan - August 11, 2009 - 09:48

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

Davy Van Den Bremt - August 27, 2009 - 13:24

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

#11

Bojhan - August 27, 2009 - 13:34
Status:needs work» won't fix

Won't fix it is then.

#12

sivaji - October 3, 2009 - 20:08

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

 
 

Drupal is a registered trademark of Dries Buytaert.