Since you are using 'special menu items' already, this looks likeCopy the existing special_menu_items module. e.g. welcome_menu_items and put it createsin your menu items alreadycustom modules directory. All you want to doIt is edit the menu 'title'. hook_menu_alter will do thisonly 200 lines, so maintenance particularly if your requirements don't change should not be large.
- Create your 3 module files. welcomemenu.module, welcomemenu.info, welcomemenu.install and copy from another module to fill out the .info and .install files.
- Create a function as follows:
Assuming welcomemenu moduleChange this code adding '. check_plain($user->name);'.
function welcomemenu_menu_alter(&$items) {case '<nolink>':
// Add comments$tag to= thevariable_get('special_menu_items_nolink_tag', description'<span>');
for admin/content.
global$title $user;
= $variables['options']['html'] $items['node/1623']['title']? =$variables['text'] 'Administer: 'check_plain($variables['text']) . check_plain($user->name);
} $variables['options']['attributes']['class'][] = 'nolink';
break;
Clear menu cacheThis will only give you the username, not the full name. You need to ensureedit the profile to provide a full name. You might also want to check that $variables['text'] contains the menus are rebuiltwork 'Welcome' before altering it.
You could debug $variables['text'] and submit a patch if there is a problem with this as noted by Clive.