You are here

Drupal Tip: navigation block for authenticated users only...

Submitted by admin on Wed, 12/15/2004 - 12:45

The navigation box in Drupal contains a collection of links that are particularly useful for registered users. When surfing a Drupal site anonymously, there are fewer links and often, when building a web site that is NOT intended for the public to open accounts, the site adminitrators decide to only display this box for internal members team (administrators, editors, etc.). This thread on Drupal describes how to do this. Basically, it involves adding one line to the user_block funtion in the user.module file.

Open user.module in a simple text editor, find the string "user_block", scroll down to where is says "Case 1", and add... "if (!$user->uid) return;" before "if ($menu = theme('menu_tree'))". Save and upload the file.

I found this useful. Chances are that this issue will be resolved in the 4.6 release of Drupal which will feature a completely revamped box/block control interface.

All my categories: