diff --git a/include/user.inc.php b/include/user.inc.php index a2255954a..fc998a643 100644 --- a/include/user.inc.php +++ b/include/user.inc.php @@ -78,7 +78,15 @@ if ( define('PWG_API_KEY_REQUEST', true); // set pwg_token for api_key request - $_POST['pwg_token'] = $_GET['pwg_token'] = get_pwg_token(); + // same logic as PwgServer::isPost() + if (!empty($_POST)) + { + $_POST['pwg_token'] = get_pwg_token(); + } + else + { + $_GET['pwg_token'] = get_pwg_token(); + } // logger global $logger;