Hello,
As I go through the 4.5 upgrade process with my modules, I realize how much the menu system has changed. Under 4.4.0, I did not have to worry about the navigation block showing to anonymous users. Yet, under 4.5 it does. How can I change this to allow only authenticated users to see the navigation block? I have been through the forums and found one thread that addressed this...but it does not work for 4.5. Also, path configurations under blocks does not enforce the authentication process I want...it only displays things under certain paths so I cannot use it for this. All suggestions are greatly appreciated.

Ciao,
Larry

Comments

droopy’s picture

Did you see http://drupal.org/node/12445 ? This comment is especially useful.

larry’s picture

Hello droopy,
Thanks for your reply. Yes, I saw this thread. As a matter of fact, it's the one I referred to. I tried this. Instead of hiding the Navigation block from un-authenticated users, it created a new block leaving Navigation untouched. What am I missing? Did you use this with 4.5.0? By the way, I'm using Bluemarine...does this make any difference?

Thanks,
Larry

--There are no Kangaroos in Austria--

droopy’s picture

That's right. But the new block displays the user menu only when users are logged in. The reason for doing it as a separate module is that it allows the username to appear in the block heading as in the standard navigation block. All you then need to do is disable the standard navigation block. It works for me using 4.5.

larry’s picture

Hello droopy,
Thank you for your suggestion. I decided to patch the user.module directly because I don't want anything showing up in the Navigation block except when someone is logged in...and then only their account information and other links I specify. I appreciate your help.

Thanks again,
Larry

--There are no Kangaroos in Austria--

chx’s picture

If you really want to use the original Navigation module, change the function user_block. In the switch ($delta) case 1 put a if (!$user->uid) return; before the if($menu =... Actually, my block is just that, a copy of user_block, I just deleted everything that was not needed.

--
Drupal development: making the world better, one patch at a time. | A bedroom without a teddy is like a face without a smile.

larry’s picture

Hello chx,
Thank you for your suggestion. It worked painlessly. I wanted to patch the user module directly. I appreciate your help.

Thanks again,
Larry

--There are no Kangaroos in Austria--

tostinni’s picture

I'm working on a patch to allow to view blocks by roles so I think it should help you.

larry’s picture

It's a great idea. I look forward to using it.

Thanks for letting me know about it,
Larry

--There are no Kangaroos in Austria--