Passing user id argument to filter I have a view that lists the (ubercart) orders of a user. I created a view for that with a filter applied: "User: current". This works perfectly this way, I use this view in my profile page template like this:

$view = views_get_view('user_orders_custom');
$result = $view-&gt;execute_display('default', array($account-&gt;uid));


My problem is that when admin is inspecting the profile page of a user, this lists the orders of the admin, not the user being watched. Of course the passed $account->uid is not used by the applied views filter User:current.

I don't know how to make my view filter on the passed uid. I tried creating a relationship, arguments but the filter thing is not clear to me.
May be what you need is contextual filters, the user can go to view-name/% where % is a contextual filter for the uid