From eaf8fa3fa57ffcefbdf1835ced096aeb6fd669b8 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Thu, 24 Jan 2008 22:35:00 +1300 Subject: [PATCH] Allow for persistent connections to the auth DB also. --- inc/auth-functions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/auth-functions.php b/inc/auth-functions.php index 09c12765..47e18eac 100644 --- a/inc/auth-functions.php +++ b/inc/auth-functions.php @@ -142,7 +142,8 @@ function UpdateUserFromExternal( &$usr ) { function AuthExternalAWL( $username, $password ) { global $c; - $authconn = pg_Connect($c->authenticate_hook['config']['connection']); + $persistent = isset($c->authenticate_hook['config']['use_persistent']) && $c->authenticate_hook['config']['use_persistent']; + $authconn = ( $persistent ? pg_pConnect($c->authenticate_hook['config']['connection']) : pg_Connect($c->authenticate_hook['config']['connection'])); if ( ! $authconn ) { echo <<Database Connection Failure