Index: video_upload.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/video_upload/video_upload.module,v
retrieving revision 1.23.2.11
diff -u -p -r1.23.2.11 video_upload.module
--- video_upload.module	7 Oct 2010 16:36:45 -0000	1.23.2.11
+++ video_upload.module	8 Feb 2011 20:02:15 -0000
@@ -169,10 +169,12 @@ function _video_upload_set_default_title
   }
 
   if (module_exists('token')) {
-    global $user;
-    $title = token_replace($title);
-    $title = token_replace($title, 'user', $user);
-    $title = token_replace($title, 'node', $node);
+    $account = user_load($node->uid);
+    $data = array(
+      'user' => $account,
+      'node' => $node,
+    );
+    $title = token_replace($title, $data);
   }
 
   // Can't be blank.
@@ -210,18 +212,24 @@ function _video_upload_set_default_descr
   }
 
   if (module_exists('token')) {
-    global $user;
-    $description = token_replace($description);
-    $description = token_replace($description, 'user', $user);
-    $description = token_replace($description, 'node', $node);
+    $account = user_load($node->uid);
+    $data = array(
+      'user' => $account,
+      'node' => $node,
+    );
+    $description = token_replace($description, $data);
   }
 
   if (!trim($description)) {
     $description = t('Video uploaded from @site_name : @site_slogan', array('@site_name' => variable_get('site_name', 'Drupal'), '@site_slogan' => variable_get('site_slogan', FALSE)));
 
     if (module_exists('token')) {
-      global $user;
-      $description = token_replace($description, 'user', $user);
+      $account = user_load($node->uid);
+      $data = array(
+        'user' => $account,
+        'node' => $node,
+      );
+      $description = token_replace($description, $data);
     }
   }
 
@@ -243,11 +251,14 @@ function _video_upload_set_developer_tag
   }
 
   if (module_exists('token')) {
-    global $user;
+    $account = user_load($node->uid);
+    $data = array(
+      'user' => $account,
+    );
     foreach ($tags as $key => $tag) {
       // There seems to be an invisible 26 character limit.
       // @TODO This is YouTube specific.
-      $tags[$key] = substr(str_replace(array(',', ' '), '', trim(check_plain(token_replace($tag, 'user', $user)))), 0, 25);
+      $tags[$key] = substr(str_replace(array(',', ' '), '', trim(check_plain(token_replace($tag, $data)))), 0, 25);
     }
   }
 
