mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-05 16:50:50 +00:00
Allow for persistent connections to the auth DB also.
This commit is contained in:
parent
7e2fcf98bd
commit
eaf8fa3fa5
@ -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 <<<EOERRMSG
|
||||
<html><head><title>Database Connection Failure</title></head><body>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user