* Login via Twitter
* Login as Drupal admin
* Delete user account associated with Twitter
=> Table twitter_account not updated by removing associated entry.

* Attempt to login again via Twitter
=> Error:

user warning: Duplicate entry '' for key 'name' query: INSERT INTO users (created) VALUES (1284499168) in /var/www/drupal/modules/user/user.module on line 327.

* Manually delete entry in table twitter_account.
* Attempt to login again via Twitter
=> Login successful

CommentFileSizeAuthor
#1 911646_delete_twitter_account.patch414 bytesbrianpkennedy

Comments

brianpkennedy’s picture

StatusFileSize
new414 bytes

Here's a patch to delete a row from the twitter_account table when the user is being deleted. It was made off of the beta3 release.

steinmb’s picture

Status: Active » Closed (fixed)

Fixed the latest version. Pls. have a look at function twitter_user_delete()

pfructuoso’s picture

Version: 6.x-3.x-dev » 7.x-3.0-beta4

I have this problem in Drupal 7 version. This function in twitter.module solves it.

/**
 * hook_user_delete implementation
 */
function twitter_user_delete($account) {
	$twitter_accounts = twitter_twitter_accounts($account);
	foreach($twitter_accounts as $ta) {
		twitter_account_delete($ta->id);
	}
}