Modify the links included in the user menu On a base Drupal install, there are 2 links included in the User Menu, My Account, and Log Out. I want to modify the My Account link to be expanded, and modify the Log Out link to be a child of the My Account link. How can I do this?

I've tried:

function MODULE_menu_alter(&amp;$items) {
  if (isset($items['user'])) {
    $items['user']['expanded'] = true;
  }
}


To at least set the My Account as expanded, but that's not working (ie. not setting the expanded property to true). And I don't know how to change the parent of the Log Out link. Preferably this could all be done without a database request.

EDIT:
I recently succeeded a little bit in using:

function MODULE_menu_link_alter(&amp;$item) {
  if ($item['link_path'] === 'user' &amp;&amp; $link['module'] === 'system') {
    $link['expanded'] = 1;
  }
}


That modifies the My account link to be expanded, but I still can't seem to modify the plid of the logout link ('user/logout').
Tested:


Go to yoursite.ca/admin/structure/menu/manage/user-menu
Click the edit button for "My account (logged in users only)"
Check the "Show as expanded" box
Click Save
Click the edit button for "Log out"
Select "My account" under the Parent link









Click Save