I have recently switched from buddylist to user relationships.

viewname/UID/

If i pass in viewname where neither UID nor relationship code are specified, all the values show up, which is what is expected.

But I would like to enter viewname/UID and have the set to "1" for approved user relationship. But it is not working given the code below.

I have a view and a pass in arguments in this order
User Relationships: UID is related to Author
User Relationships: UID to Author is

argument code

<!-- arg[1] is user id, arg[2] is reltionship rtid. make it "1" if none if there is a value for uid. I am using the "me" module-->
if ($arg[1] || $arg[1] == 'me') {
    if (!$arg[2]) {
    return  array(2 => 1);
   }
}

I am sure it is a small mistake, but any help you can give me would be helpful

Thanks, Chris

Comments

webchick’s picture

Status: Active » Closed (duplicate)