diff options
Diffstat (limited to 'perl-lib/PgCommitFest/Handler.pm')
-rw-r--r-- | perl-lib/PgCommitFest/Handler.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/perl-lib/PgCommitFest/Handler.pm b/perl-lib/PgCommitFest/Handler.pm index 097b7e7..77e7a62 100644 --- a/perl-lib/PgCommitFest/Handler.pm +++ b/perl-lib/PgCommitFest/Handler.pm @@ -99,7 +99,13 @@ sub login { my $pg_login_db = PgCommitFest::DB->connect(defined $ENV{'PGCOMMITFEST_LOGIN_DB'} ? $ENV{'PGCOMMITFEST_LOGIN_DB'} - : 'dbi:Pg:dbname=pgcommitfest user=pgcommitfest', '', ''); + : 'dbi:Pg:dbname=pgcommitfest user=pgcommitfest', + defined $ENV{'PGCOMMITFEST_LOGIN_DB_USERNAME'} ? + $ENV{'PGCOMMITFEST_LOGIN_DB_USERNAME'} : '', + + defined $ENV{'PGCOMMITFEST_LOGIN_DB_PASSWORD'} ? + $ENV{'PGCOMMITFEST_LOGIN_DB_PASSWORD'} : '' + ); my $u = $pg_login_db->select_one(<<EOM, SELECT userid_p AS userid FROM community_login(?, ?) WHERE success != 0 EOM |