From a825e2c29df610e0ae7937cf3fc8cfe47db14963 Mon Sep 17 00:00:00 2001 From: patrickober <{ID}+{username}@users.noreply.github.com> Date: Wed, 20 Feb 2019 22:14:51 +0100 Subject: [PATCH] fix for issue #24 --- oauth/resource.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/oauth/resource.php b/oauth/resource.php index 02b4671..40247cc 100755 --- a/oauth/resource.php +++ b/oauth/resource.php @@ -24,7 +24,7 @@ $resp = array("error" => "Unknown error", "message" => "An unknown error has occ // get information on user associated to the token $info_oauth = $server->getAccessTokenData(OAuth2\Request::createFromGlobals()); $user = $info_oauth["user_id"]; -$assoc_id = $info_oauth["assoc_id"]; +$assoc_id = intval($info_oauth["assoc_id"]); // Open a LDAP connection $ldap = new LDAP($hostname,$port,$ldap_version); @@ -46,4 +46,4 @@ catch (Exception $e) } // send data or error message in JSON format -echo json_encode($resp); \ No newline at end of file +echo json_encode($resp);