1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2025-12-13 09:56:01 +00:00

init identity_provider only after all conditions are met

This commit is contained in:
FreddleSpl0it
2024-02-26 13:12:44 +01:00
parent 6928eb632e
commit d237157c0b
4 changed files with 16 additions and 6 deletions

View File

@@ -2099,12 +2099,20 @@ function uuid4() {
}
function identity_provider($_action, $_data = null, $_extra = null) {
global $pdo;
global $iam_provider;
$data_log = $_data;
if (isset($data_log['client_secret'])) $data_log['client_secret'] = '*';
if (isset($data_log['access_token'])) $data_log['access_token'] = '*';
switch ($_action) {
case NULL:
if ($iam_provider) {
return $iam_provider;
} else {
$iam_provider = identity_provider("init");
}
break;
case 'get':
$settings = array();
$stmt = $pdo->prepare("SELECT * FROM `identity_provider`;");