I'm trying to find or build a custom block that would display the information held in MYSITE.com/users/USERNAME

I would think it would be as simple as using the same code that is used for calling up this node and applying to a custom block with php enabled?

Knowing the world, it's not that simple but maybe right?

Thanks in advance!

Comments

Anonymous’s picture

You could do it with a module if you really wanted to get fancy, or you could just create a block with input format set to php, and then do something like this:

<?php
 global $user;

  profile_load_profile($user);
  // Now $user has the profile fields
  if ( $user->profile_yourfieldname )
  {
    // Do something
  }
?>

See http://drupal.org/node/22908

Doug Gough
ImageX Media

CWitt-1’s picture

I tried using that code and nothing came up. Not even the title of the block. I'm unsure of why that would happen, because the blocks that I had been making would show the title even when the code was wrong...

Any chance this has anything to do with Drupal 6?