Index: modules/user/user.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.module,v
retrieving revision 1.892.2.7
diff -u -r1.892.2.7 user.module
--- modules/user/user.module	17 Aug 2008 10:49:02 -0000	1.892.2.7
+++ modules/user/user.module	22 Aug 2008 15:48:25 -0000
@@ -2236,14 +2236,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));
 }
 
 /**
