I do not want the user login block to be displayed for users who are not admin. I only want it to be displayed for the admin user (sitadmin, uid:1, in my case) and users who are not logged in (uid:0)
In the configure page (/admin/build/block/configure/user/0) for the block, under page specific settings, I have selected "Show if the following PHP code returns TRUE (PHP-mode, experts only)." and given the following code:
<?php
global $user;
if($user->uid===1 or $user->uid===0)
return TRUE;
else
return FALSE;
?>
However, it is still visible even for users with uid 3,4 etc. I have tried clearing cache, with no avail. On the other hand, if I simply put
<?php return FALSE;?>
the user block is not shown for anonymous users.
Note: Role specific visibility settings don't seem to have an effect on this.
Any help?