I have a module below that will only show "hello world" when I am an administrator. I would also like "hello world" to display when I an authenticate user but right now all I am getting is you are not authorised. I have set mymenuitem as the home page and I am using Drupal 7.
function mymenuitem_menu() {
$items = array();
$items['mymenuitem'] = array(
'title' => 'mymodule',
'description' => 'my menu access issue',
'page callback' => 'mymodule_homepage',
'access arguments' => array('access mymodule homepage'),
'type' => MENU_LOCAL_TASK,
);
return $items;
}
function mymodule_homepage(){
drupal_set_title(t('menu system'));
return "hello world";
}
How can I achieve this?
'access arguments'
) mentioned. You do so by following the method shown by @Aiias.