Index: twitter.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/twitter/twitter.inc,v retrieving revision 1.3.2.12 diff -u -p -r1.3.2.12 twitter.inc --- twitter.inc 2 Jul 2009 13:26:21 -0000 1.3.2.12 +++ twitter.inc 3 Jul 2009 06:10:23 -0000 @@ -373,6 +373,15 @@ function _twitter_request_failure($resul * @see twitter_cache_status() */ function twitter_cache_account($twitter_account = array()) { + // convert boolean into int since it doesn't appear to be + // handled correctly otherwise + if ($twitter_account['protected']) { + $twitter_account['protected'] = 1; + } + else { + $twitter_account['protected'] = 0; + } + db_query("DELETE FROM {twitter_account} WHERE twitter_uid = %n", $twitter_account['twitter_uid']); drupal_write_record('twitter_account', $twitter_account); } Index: twitter.pages.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/twitter/twitter.pages.inc,v retrieving revision 1.2.2.8 diff -u -p -r1.2.2.8 twitter.pages.inc --- twitter.pages.inc 2 Jul 2009 13:23:44 -0000 1.2.2.8 +++ twitter.pages.inc 3 Jul 2009 06:10:23 -0000 @@ -257,6 +257,14 @@ function twitter_add_account_submit($for module_load_include('inc', 'twitter'); if (!empty($form_state['values']['screen_name'])) { + // if the password wasn't empty either get the account info + // so we can figure out if the account is protected + if (!empty($form_state['values']['password'])) { + $account = twitter_fetch_account_info($form_state['values']['screen_name'], $form_state['values']['password']); + if ($account['protected']) { + $form_state['values']['protected'] = TRUE; + } + } twitter_user_save($form_state['values'], TRUE); } }