title: How to add a menu item from my custom Drupal 7-module
body: <p>with my custom drupal-module i'm trying to insert add a menu-item to a menu using <code>hook_menu()</code>. 
  It should display the user-name linked to the user-profile.
  (My task could be similar to <a href="https://stackoverflow.com/questions/3386456/add-menu-item-link-to-drupal-menu-programatically">Add menu item/link to Drupal menu (programatically?)</a>.)</p>
  
  <p>[Edit:] I tried to solve the task with the following, but it could be, that its the wrong way to do it..</p>
  
  <pre class="lang-php prettyprint-override"><code>function mymodule_view_user_page()
  {  
    global $user;
    if ($user-&gt;uid != 0) {
      /*$items = array(
        'link_path'   =&gt; drupal_get_normal_path('user'),
        'link_title'  =&gt; 'Account',
        'menu_name'   =&gt; 'main-menu',
        'weight'      =&gt; 8,
      );*/
  
      $items['user'] = array(
        'title'           =&gt; 'Page name',
        'description'     =&gt; t('Account'),
        'menu_name'       =&gt; 'main-menu',
        'weight'          =&gt; 8,
        'access callback' =&gt; TRUE,
        'page callback'   =&gt; 'mymodule_view_user_page',
        'access arguments' =&gt; array('view own profile'), // permission
        'type' =&gt; MENU_NORMAL_ITEM,
  
      );
      return $items;
    }
  }
  
  function mymodule_view_user_page_view_user_page()
  {
    drupal_goto('user');
  }
  </code></pre>
  
  <p>With the code above there is nothing showing up, but also no errors..</p>
  
  <p>I probably don't want to use an <code>page callback</code> since that page already exists properly but i'm unsure about not setting it.</p>
  
  <p>The <code>hook_menu()</code> documentation-page <a href="http://api.drupal.org/api/drupal/modules!system!system.api.php/function/hook_menu/7" rel="nofollow noreferrer">hook_menu</a> is really extensive but it seems i'm not understanding it correct and beginning to loose hairs over it.. </p>
  
  <p>Thank you for hints!
  PP</p>