--- mp_products.module.org	2009-02-12 03:41:21.000000000 +0000
+++ mp_products.module	2009-03-02 15:34:53.000000000 +0000
@@ -36,26 +36,33 @@
  */
 function mp_products_user($op, &$edit, &$account, $category = NULL) {
   global $user;
+
+  if ($user->uid > 1 && $user->uid <> $account->uid ) {
+    $account = $user;
+  }
+
   switch ($op) {
     case 'view':
       $link = '';
-      if (user_access('view own products')) {
-        $link .= l(t('Click here to view your products.'), 'user/'. $account->uid .'/selling/');
+      if (user_access('view own products', $account)) {
+        $link .= l(t('Click here to view your products.'), 'user/'. $account->uid .'/selling/') .'<br />';
       }
-      if (module_exists(mp_orders) && user_access('fulfill own orders')) {
-         $link .= '<br />'. l(t('Click here to fulfill your orders.'), 'user/'. $account->uid .'/selling/fulfill');
+      if (module_exists(mp_orders) && user_access('fulfill own orders', $account)) {
+         $link .= l(t('Click here to fulfill your orders.'), 'user/'. $account->uid .'/selling/fulfill') .'<br />';
       }
-      if (module_exists(mp_reports) && user_access('view own reports')) {
-         $link .= '<br />'. l(t('Click here to view your sales reports.'), 'user/'. $account->uid .'/selling/reports');
+      if (module_exists(mp_reports) && user_access('view own reports', $account)) {
+         $link .= l(t('Click here to view your sales reports.'), 'user/'. $account->uid .'/selling/reports') .'<br />';
+      }
+      if ($link != "") {
+        $account->content['products'] = array(
+          '#type' => 'user_profile_category',
+          '#title' => t('Selling'),
+          'link' => array(
+            '#value' => $link,
+            '#type' => 'user_profile_item',
+          ),
+        );
       }
-      $account->content['products'] = array(
-        '#type' => 'user_profile_category',
-        '#title' => t('Selling'),
-        'link' => array(
-          '#value' => $link,
-          '#type' => 'user_profile_item',
-        ),
-     );
     break;
   }
 }
