I've ran into this issue in the past. I have a block which I want to show on all profile pages so on the block settings page I chose to display it on user/*. But then it displays on the login page user/login or the registration page, user/register etc.

Here is how i've solved it:

<?php 
$islogin = arg(1); 

if($islogin != login && $islogin != register && $islogin !=password){
?>

CONTENT OF BLOCK HERE

<?php
}
?>

Comments

Andreas Radloff’s picture

Show block only on:
user/me
user/*0
user/*1
user/*2
user/*3
user/*4
user/*5
user/*6
user/*7
user/*8
user/*9

Drupalutvecklare | Drupal Developer in Sweden

Yuki’s picture

Subscribe

thekayra’s picture

The following is the simplest method IMHO:

<?php
// Only show on true user VIEW pages. Not user/register or user/n/edit etc
return (arg(0)=='user' && is_numeric(arg(1)) && (!arg(2)));
?>