I had activated UR-Block module to have relationship in blocks. However, this block not giving me custom uid in my custom content type. After debugging, I found that If I change order of following IF condition in user_relationship_blocks_block_view function(user_relationship_blocks.module) then I am able to use it in custom content type.
Current:
// determine which user's relationships to display
if ($is_my_block && $user->uid) {
$account = $user;
}
else if (module_exists('php') && !empty($settings->get_account) && $uid = php_eval($settings->get_account)) {
$account = user_load($uid);
}

New:
if (module_exists('php') && !empty($settings->get_account) && $uid = php_eval($settings->get_account)) {
$account = user_load($uid);
}
else if ($is_my_block && $user->uid) {
$account = $user;
}
Please guide me if I am missing something.

Comments

mrf’s picture

Status: Active » Closed (works as designed)

I am going to have to assume that swapping these would have unintended consequences.

I would love to drop the entire php uid lookup field, but it would definitely make for a very complicated upgrade path, and will probably stick around in 6.x (its already gone from 7).

I would recommend to anyone attempting this to use a view instead and pass the correct argument or use the combinations of views and panels to display the content you want.