Does /user really go to /users/LoggedInUserName? I have a block that I put on /users/* and it shows mysteriously on /user and the block I put on /user doesn’t show at all. Is there a workaround for that?
Joel Willers
It depends on whether a user is logged in or not.
When I add a block only to the listed pages: users/*
And a user is logged in, then the block appears in example.com/users/username and also appears in example.com/user
When I add an additional block, only listed on the pages: user then the block appears only on the example.com/user page, if no user is logged in. Does that help?
Ursula
On Mon, Aug 15, 2011 at 11:57 AM, Joel Willers joel.willers@sigler.comwrote:
Does /user really go to /users/LoggedInUserName? I have a block that I put on /users/* and it shows mysteriously on /user and the block I put on /user doesn’t show at all. Is there a workaround for that?
Joel Willers
[ Drupal support list | http://lists.drupal.org/ ]
For those wondering, if you _GET 'q', it, in fact, is users/LoggedInUserName, and NOT /user. My solution was to use PHP validation for pages. _GET 'q', throw it into $path, compare to global $user.
Here is the validation code, if anyone needs it: <?php global $user; $path = drupal_get_path_alias($_GET['q']); $path = explode('/', $path);
if ($path[0] == 'users' && $path[1] == $user->name) return (true); else return(false);
?>
If you need it to only show on /user the above code will work in the Visibility settings area.
Joel
Subject: [support] Blocks on user pages
Does /user really go to /users/LoggedInUserName? I have a block that I put on /users/* and it shows mysteriously on /user and the block I put on /user doesn’t show at all. Is there a workaround for that?
Joel Willers