diff --git a/app/workers/functions.php b/app/workers/functions.php index 2518e8908f..b359639a4b 100644 --- a/app/workers/functions.php +++ b/app/workers/functions.php @@ -345,9 +345,9 @@ class FunctionsV1 'APPWRITE_FUNCTION_EVENT' => $event, 'APPWRITE_FUNCTION_EVENT_PAYLOAD' => $payload, 'APPWRITE_FUNCTION_DATA' => $data, - 'APPWRITE_FUNCTION_USERID' => $userId, + 'APPWRITE_FUNCTION_USER_ID' => $userId, 'APPWRITE_FUNCTION_JWT' => $jwt, - 'APPWRITE_PROJECT_ID' => $projectId, + 'APPWRITE_FUNCTION_PROJECT_ID' => $projectId, ]); \array_walk($vars, function (&$value, $key) { diff --git a/tests/resources/functions/php-fn.tar.gz b/tests/resources/functions/php-fn.tar.gz index 02aff81450..b6906b615e 100644 Binary files a/tests/resources/functions/php-fn.tar.gz and b/tests/resources/functions/php-fn.tar.gz differ diff --git a/tests/resources/functions/php-fn/index.php b/tests/resources/functions/php-fn/index.php index 8490d2b1c6..387ba8eb9e 100644 --- a/tests/resources/functions/php-fn/index.php +++ b/tests/resources/functions/php-fn/index.php @@ -27,5 +27,5 @@ echo $_ENV['APPWRITE_FUNCTION_ENV_VERSION']."\n"; echo $_ENV['APPWRITE_FUNCTION_EVENT']."\n"; echo $_ENV['APPWRITE_FUNCTION_EVENT_PAYLOAD']."\n"; echo 'data:'.$_ENV['APPWRITE_FUNCTION_DATA']."\n"; -echo 'userId:'.$_ENV['APPWRITE_FUNCTION_USERID']."\n"; +echo 'userId:'.$_ENV['APPWRITE_FUNCTION_USER_ID']."\n"; echo 'jwt:'.$_ENV['APPWRITE_FUNCTION_JWT']."\n";