Skip to content
Browse files

added UID global variable

  • Loading branch information...
1 parent 38b4ca8 commit 9d107cdc508a5e80bf898aac91ba6cc24bdb47f9 Mashape committed Feb 15, 2011
Showing with 4 additions and 1 deletion.
  1. +1 −1 api.php
  2. +1 −0 mashape/init/init.php
  3. +1 −0 mashape/methods/call/call.php
  4. +1 −0 mashape/settings.php
View
2 api.php
@@ -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
View
1 mashape/init/init.php
@@ -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");
View
1 mashape/methods/call/call.php
@@ -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 {
View
1 mashape/settings.php
@@ -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.
Something went wrong with that request. Please try again.