Regarding menus for authenticated users only Using Structures/Menus/User Menu in DRUPAL 7 i am adding a custom menu link under it and providing a path to it as node/whatever_my_nid. It is working fine. I have cleared all cache. However this menu link is being displayed for all users. I want it to be displayed only for authenticated users and admin. This should be a simple thing to figure out but apparently i cannot. I thought it would have been a permission issues but i don't think so. Would appreciate any help.
Thanks

Edit: I found that this code may help:

&lt;?php
global $user;
if ($user-&gt;uid) {
if ($menu = theme_menu_tree()) {
   $menu = "&lt;div class=\"menu\"&gt;". $menu . "&lt;/div&gt;";
   return $menu;
}
}
else {return;}
?&gt;


But where do i place this code...In my page.tpl.php or somewhere else like in template.php in my themes?

I tried placing the above function in my theme's preprocess function as:

function ypwb_preprocess_block(&amp;$variables, $hook) {
     if ($user-&gt;uid) {
        if ($menu = theme_menu_tree()) {
           $menu = "&lt;div class=\"menu\"&gt;". $menu . "&lt;/div&gt;";
           return $menu;
        }
      }
        else {return;}
    }


However, the menu is still showing for anonymous user as well.
What I usually do is:


Install and enable Taxonomy Access
Create a vocabulary called Access
Create 2 terms in the new Access vocabulary: Public and Private
Attach the term reference fields for Access vocabulary to each node type you wish to protect. You may want to set the default value to "Public".
Go to Taxonomy Access configuration page and set D (deny) View access to Anonymous users on Private term. Leave the rest of the options (update delete view tag etc) I (ignore).
Configure the access control for Authenticated users and set A (allow) View access to Authenticated users on Private term, and set I (ignore) for all else.
Now all you need to do is set Private on nodes you wish to protect, and set Public for all else.