Hi Everyone!

I have a very simple question. I have read lots of this topic, but I can't able to solve this problem.
So, I have a menu, and I'd like to show this page (which the menu calls) only for the authenticated users.

I tried this:

<?php
$items[] = array(
		'path' => 'procurement/userprocurements',
		'title' => t('User Procurements'),
		'callback' => 'procurement_userprocurements_page',
		'access callback' => 'user_access',
    	'access arguments' => array('acces procurement content'),
		'type' => MENU_NORMAL_ITEM,
		'weight' => -9,
	);
?>

I'd like to anonymus users don't have permission for this page and they don't see this menu.
Could anyone help me?

Comments

aleksei.tarasov’s picture

<?php
global $user;
if ($user->uid) {
 return t('You are currently logged in');
}
else {
 return t('You are not currently logged in');
}
?>