Skip to content

Commit

Permalink
added UID global variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Mashape committed Feb 15, 2011
1 parent 38b4ca8 commit 9d107cd
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion api.php
Expand Up @@ -2,7 +2,7 @@

require_once("mashape/mashape.php");

// The path of the XML configuration file required by Mashape. By default it's "./api.xml"
// The path of the XML configuration file required by Mashape:
define("CONFIGURATION_FILEPATH", "./api.xml");

// This is the server key for your component
Expand Down
1 change: 1 addition & 0 deletions mashape/init/init.php
Expand Up @@ -26,6 +26,7 @@

require_once(dirname(__FILE__) . "/headers.php");
require_once(dirname(__FILE__) . "/session.php");
require_once(dirname(__FILE__) . "/../settings.php");
require_once(dirname(__FILE__) . "/json.php");
require_once(dirname(__FILE__) . "/../exceptions/mashapeException.php");

Expand Down
1 change: 1 addition & 0 deletions mashape/methods/call/call.php
Expand Up @@ -128,6 +128,7 @@ private function validateRequest($serverKey, $token, $method, $language, $versio
throw new MashapeException($error->message, $error->code);
}
$authorization = $validationResponse->authorized;
$GLOBALS[UID] = $validationResponse->uid;
if ($authorization == true) {
return true;
} else {
Expand Down
1 change: 1 addition & 0 deletions mashape/settings.php
Expand Up @@ -27,5 +27,6 @@
// The variable name where Mashape will cache the configuration file.
// By default it's "mashape_api_configuration"
define("SESSION_VARNAME", "mashape_api_configuration");
define("UID", "mashape_uid");

?>

0 comments on commit 9d107cd

Please sign in to comment.