Index: modules/user/user.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.module,v
retrieving revision 1.917
diff -u -r1.917 user.module
--- modules/user/user.module	21 Aug 2008 19:36:39 -0000	1.917
+++ modules/user/user.module	22 Aug 2008 16:14:14 -0000
@@ -2204,14 +2204,16 @@
   }
   elseif (isset($context['uid'])) {
     $uid = $context['uid'];
+    $object = user_load($context['uid']);
   }
   else {
     global $user;
     $uid = $user->uid;
+    $object = $user;
   }
   db_query("UPDATE {users} SET status = 0 WHERE uid = %d", $uid);
   sess_destroy_uid($uid);
-  watchdog('action', 'Blocked user %name.', array('%name' => check_plain($user->name)));
+  watchdog('action', 'Blocked user %name.', array('%name' => $object->name));
 }
 
 /**
