User menu page visible to the author user (uid) The view module has a great function when set a menu tab with contextual filter user:uid, so the user that is author of that node will be able to see the content. Lets say for an example the flag module has a view bookmarks, so when a user choose some node to follow/flag it will be available in his user/%/bookmarks.

How can I do this with custom code?
I have my code here as a test:

&lt;?php
function mymodule_menu() {


    $items = array();   

    $items['user/%/add-news'] = array(
        'title' =&gt; 'Hello World',
        'page callback' =&gt; 'mymodule_user_news',
        'page arguments' =&gt; array(1),
        'access arguments' =&gt; array('access content'),
    );

    return $items;
}

function mymodule_user_news() {
        return 'Hello world';
}


This "Hello World" everybody can see it. Of course, because I'm using 
'access arguments' => array('access content'),

How can I set this page to be visible only for user author?

I'm planning to add here a form, so the user can fill the form and send it to the administrator of the website.

Oh, by the way when I set a link only visible to the author user I use this 
 echo l(t("Profile edit"), 'user/' . $GLOBALS['user']->uid . '/edit');

How can I use the $GLOBALS['user']->uid in a module?
Access arguments


  Understanding access arguments in Drupal's menu system can be a little
  confusing, but they are really quite simple. Let's take this example
  and work through the arguments.

&lt;?php
  $items['foo/bar/user'] = array(
    'title' =&gt; 'Foobar',
    'description' =&gt; 'List, add, and edit Foobars.',
    'page callback' =&gt; 'foo_bar_function',
    'access callback' =&gt; 'user_access',
    'access arguments' =&gt; array('administer users'),
  );
?&gt;

  
  Permissions Arguments, array('this_permission') Here access arguments
  is the key for an array that contains one item administer users. This
  means that the current user must have permission to administer users
  in order to access the page. Which page? Notice the first line gives
  the path to $item. The path is 'foo/bar/user'.
  
  In this example, 'administer users' is the string that drupal uses to
  reference permissions. If you go to the permissions page (Administer
  
  
    
      User Management >> Permissions), you can see a list of strings you might use for access arguments. Each permission can be used by your
      module.