Show display name in topbar

Hi

Want to show the Display name in topbar, but does not work. Why not? Tried with username first..

    elgg_register_menu_item('topbar', array(
        'name' => 'name',
        'href' => "profile/" . $user->username,
        'text' => $user->username,
        'title' => $user->username,
        'priority' => 300,
    ));

I added it in the init in the theme. What could be wrong?

/TheMuller

Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking