Files
Testing/tbs/wp-content/plugins/avsecure/functions.php
sean 0e8a8b3028
Some checks are pending
deploy-testing / deploy (push) Waiting to run
Initial testing snapshot
2026-11-17 16:15:01 -05:00

20 lines
565 B
PHP

<?php
// url_with_auth_token adds token parameters to url string
// it should be used to wrap all in-domain links to prevent re-authorization on each page inside domain
function url_with_auth_token( $url ) {
// use global $query_params that was initialized during auth check on page load
global $query_params;
// no auth info, return original url
if ( $query_params['uuid'] == "" ) {
echo $url;
return;
}
$url .= (strstr($url, '?')) ? "&" : "?";
$url .= "uuid=" . urlencode( $query_params['uuid'] );
echo $url;
}