You are here

function _user_relationship_blocks_find_user_php in User Relationships 6

Default get_account php This will retrieve the author of the node being viewed or the user being viewed

2 calls to _user_relationship_blocks_find_user_php()
_user_relationship_blocks_insert_defaults in user_relationship_blocks/user_relationship_blocks.module
Update the table with default values This makes sure it's not writing over user defined settings
_user_relationship_blocks_settings in user_relationship_blocks/user_relationship_blocks.module
Push or pull the settings from the database

File

user_relationship_blocks/user_relationship_blocks.module, line 250
User Relationship Blocks implementation @author Jeff Smick (creator) @author Alex Karshakevich (maintainer) http://drupal.org/user/183217

Code

function _user_relationship_blocks_find_user_php() {
  return <<<PHP
<?php
  if (arg(0) == 'node' && is_numeric(arg(1))) {
    \$node = node_load(arg(1));
    return \$node->uid;
  }
  else if ((arg(0) == 'user' || arg(0) == 'blog') && is_numeric(arg(1))) {
    return arg(1);
  }
?>
PHP;
}