When twitter_fetch_mentions_timeline() encounters a mention, it will save the author of that tweet in the twitter_account table with uid = 0, which is the anonymous user. When user_load(0) is called, twitter_user_load() will happily load all twitter accounts with uid = 0, which can be a lot. I suggest that twitter_user_load() is changed such that it will not process uid = 0.

Comments

jorrit’s picture

Title: Anonymous user (0) has many associated accounts because of $query = db_query(' SELECT * FROM {twitter_account} WHERE uid != 0 LIMIT 10'); dpm($query->fetchAll()); module_load_include('inc', 'twitter'); $m = twitter_fetch_mentions_timeline() » Anonymous user (0) has many associated accounts because of twitter_fetch_mentions_timeline()
jorrit’s picture

Status: Active » Needs review
StatusFileSize
new549 bytes
damienmckenna’s picture

Version: 7.x-5.8 » 7.x-5.x-dev
Status: Needs review » Needs work

Triggering the testbot.

damienmckenna’s picture

Status: Needs work » Needs review

Triggering the testbot.

Status: Needs review » Needs work

The last submitted patch, 2: twitter-load-uid-0-2369833-1.patch, failed testing.

jorrit’s picture

It seems to me that the tests are already broken.

baldwinlouie’s picture

StatusFileSize
new463 bytes

This is broken for 7.x-6.x too. Attaching patch for that branch.

damienmckenna’s picture

Status: Needs work » Needs review
StatusFileSize
new587 bytes

I updated the comment for the v5 patch.

  • DamienMcKenna committed 3ecc76d on 7.x-5.x authored by Jorrit
    Issue #2369833 by Jorrit: twitter_twitter_accounts() shouldn't return...
damienmckenna’s picture

Version: 7.x-5.x-dev » 7.x-6.x-dev
StatusFileSize
new641 bytes

Rerolled for the v6 branch.

damienmckenna’s picture

Status: Needs review » Fixed

Committed. Thank you both.

  • DamienMcKenna committed e01dbc1 on 7.x-6.x authored by Jorrit
    Issue #2369833 by Jorrit, baldwinlouie: twitter_twitter_accounts()...
damienmckenna’s picture

I also committed it to the D6 branch.

  • DamienMcKenna committed 5b3e512 on 6.x-5.x authored by Jorrit
    Issue #2369833 by Jorrit: twitter_twitter_accounts() shouldn't return...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

The last submitted patch, 8: twitter-n2369833-8.patch, failed testing.

Status: Closed (fixed) » Needs work

The last submitted patch, 10: twitter-n2369833-9.patch, failed testing.

damienmckenna’s picture

Status: Needs work » Closed (fixed)