--- fb.module.orig	2012-01-12 13:18:14.000000000 +0800
+++ fb.module	2012-01-12 13:19:12.000000000 +0800
@@ -1468,10 +1468,12 @@ function fb_format_username($account) {
  * @TODO cache, because drupal doesn't, and calls this often.
  */
 function fb_username_alter(&$name, $account) {
+  global $_fb_app;
   // This function can be called very early in the bootstrap process, before
   // the modules are initialized, in which case we will fail to alter the
   // name.
-  if (isset($GLOBALS['_fb']) && $fbu = fb_get_fbu($account)) { // @TODO - is fb_get_fbu() a performance hit here?
+  $fb_app_data = fb_get_app_data($_fb_app);
+  if (isset($GLOBALS['_fb']) && $fbu = fb_get_fbu($account) && $fb_app_data['fb_app']['username_alter']) { // @TODO - is fb_get_fbu() a performance hit here?
     try {
       // Use fql query instead of graph api, because it will succeed more often.
       $data = fb_fql_query($GLOBALS['_fb'], "SELECT name FROM user WHERE uid=$fbu", array(
