diff --git a/stormtask/stormtask.module b/stormtask/stormtask.module
index 8d62489..359b5ae 100644
--- a/stormtask/stormtask.module
+++ b/stormtask/stormtask.module
@@ -192,7 +192,7 @@ function stormtask_storm_rewrite_where_sql($query, $primary_table, $account) {
     }
     if (user_access('Storm task: view if assigned to task')) {
       if ($cond) $cond .= ' OR ';
-      $cond .= 'sta1.assigned_nid='. $account->uid;
+      $cond .= 'sta1.assigned_nid='. $user->stormperson_nid;
       
       if (module_exists('stormteam')) {
         // Load teams that the account belongs to
