mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-17 01:20:24 +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 ) {
|
function AuthExternalAWL( $username, $password ) {
|
||||||
global $c;
|
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 ) {
|
if ( ! $authconn ) {
|
||||||
echo <<<EOERRMSG
|
echo <<<EOERRMSG
|
||||||
<html><head><title>Database Connection Failure</title></head><body>
|
<html><head><title>Database Connection Failure</title></head><body>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user