web

Drupal Hide Block from Admin

Have you every wanted to hide ad blocks or some other content in Drupal when you're logged in? To do so, you will need to enter this code block into the "Show if the following PHP code returns TRUE (PHP-mode, experts only)" section under Page specific visibility settings.

  1. <?php
  2. global $user;
  3. if ($user->uid != 1 && $user->uid !=3)
  4. return TRUE;
  5. ?>