Open IDP profile on MyPage

This commit is contained in:
Lectom C Han
2026-02-04 13:00:15 +09:00
parent 5a8320bb78
commit d920cd5249
7 changed files with 40 additions and 0 deletions

View File

@@ -3,8 +3,12 @@ if (session_status() === PHP_SESSION_NONE) {
session_start();
}
require_once __DIR__ . '/../bbs/env.php';
kngil_load_env_once(dirname(__DIR__, 2) . '/.env');
$isLogin = isset($_SESSION['login']);
$auth = $_SESSION['login']['auth_bc'] ?? '';
$idpServiceUrl = getenv('IDP_SERVICE_URL') ?: '';
$loginName = $_SESSION['login']['idp_name'] ?? ($_SESSION['login']['user_nm'] ?? '');
$loginEmail = $_SESSION['login']['idp_email'] ?? ($_SESSION['login']['email'] ?? '');
$displayName = $loginName ?: ($loginEmail ?: '');
@@ -141,6 +145,7 @@ $isCompanyAdmin = in_array($auth, ['BS100100', 'BS100200', 'BS100300', 'BS100400
</style>
<script>
window.IS_LOGIN = <?= isset($_SESSION['login']) ? 'true' : 'false' ?>;
window.IDP_SERVICE_URL = <?= json_encode($idpServiceUrl, JSON_UNESCAPED_SLASHES) ?>;
</script>
</head>