Files
Testing/tbs/wp-content/plugins/avsecure/functions.php

20 lines
565 B
PHP
Raw Normal View History

2026-11-17 16:15:01 -05:00
<?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;
}