diff options
author | Robert Haas | 2009-05-26 11:11:46 +0000 |
---|---|---|
committer | Robert Haas | 2009-05-26 11:11:46 +0000 |
commit | 0bf2c02e0126e48aca9e6d8db9ea7e426060cf44 (patch) | |
tree | cce8e5883a1c1074b1059082a19531f3de36699a | |
parent | e250b34c5572b3162929c6a6a59c78cbf936ebcd (diff) |
Hooks for real community logins.
-rw-r--r-- | perl-lib/PgCommitFest/Handler.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/perl-lib/PgCommitFest/Handler.pm b/perl-lib/PgCommitFest/Handler.pm index 820364a..89ed024 100644 --- a/perl-lib/PgCommitFest/Handler.pm +++ b/perl-lib/PgCommitFest/Handler.pm @@ -91,10 +91,15 @@ sub login { # Attempt to validate login. if ($r->cgi('go') && ! $r->is_error) { - my $u = $r->db->select_one(<<EOM, + my $pg_login_db = + PgCommitFest::DB->connect(defined $ENV{'PGCOMMITFEST_LOGIN_DB'} ? + $ENV{'PGCOMMITFEST_LOGIN_DB'} + : 'dbi:Pg:dbname=pgcommitfest user=pgcommitfest', '', ''); + my $u = $pg_login_db->select_one(<<EOM, SELECT userid FROM community_login(?, ?) WHERE success != 0 EOM $value{'userid'}, $value{'password'}); + $pg_login_db->disconnect; if (defined $u) { my $random_bits; open(RANDOM_BITS, '</dev/urandom') || die "/dev/urandom: $!"; |