Skip to content

Commit

Permalink
Fix pretty bad SQL bug
Browse files Browse the repository at this point in the history
Was I drinking when I wrote those?
  • Loading branch information
hoelzro committed Oct 15, 2011
1 parent 2d9f0b6 commit 3f427ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/Act/AuthMethod/Facebook.pm
Expand Up @@ -72,7 +72,8 @@ sub handle_postback {
my $sth = $dbh->prepare(<<SQL);
SELECT u.user_id FROM facebook_auths AS fa
INNER JOIN users AS u
ON fa.facebook_id = ?
ON fa.user_id = u.user_id
WHERE fa.facebook_id = ?
SQL

$req->session->{'auth_method_info'} = $profile;
Expand Down
3 changes: 2 additions & 1 deletion lib/Act/AuthMethod/Twitter.pm
Expand Up @@ -85,7 +85,8 @@ sub handle_postback {
my $sth = $dbh->prepare(<<SQL);
SELECT u.user_id FROM twitter_auths AS ta
INNER JOIN users AS u
ON ta.twitter_id = ?
ON ta.user_id = u.user_id
WHERE ta.twitter_id = ?
SQL

$session->{'auth_method_info'} = {
Expand Down

0 comments on commit 3f427ae

Please sign in to comment.