--- ad_views.inc.orig	2008-04-17 20:59:08.000000000 -0400
+++ ad_views.inc	2008-04-19 22:34:51.000000000 -0400
@@ -223,7 +223,7 @@ function ad_views_default_views() {
       watchdog('ad', t('Unable to create View for @group', array('@group' => $group)));
       continue;
     }
-  
+
     $view = new stdClass();
     $view->name = t('active_@group_group_ads', array('@group' => $group));
     $view->description = t('Display all active @group ads in a block.', array('@group' => $group));
@@ -467,7 +467,7 @@ function ad_views_default_views() {
   $view->exposed_filter = array();
   $view->requires = array(node, ads);
   $views[$view->name] = $view;
-  
+
   return $views;
 }
 
@@ -503,10 +503,8 @@ function ad_handler_filter_group($op) {
 }
 
 function ad_handler_filter_current_user($op, $filterdata, $filterinfo, &$query) {
-  global $user;
-
   $query->ensure_table('ad_owners');
-  $query->add_where("ad_owners.uid = %d", $user->uid);
+  $query->add_where("ad_owners.uid = '***CURRENT_USER***'");
 }
 
 function ad_handler_filter_adstatus($op) {
