Hi,
In the following documentation: https://getstarted.sailthru.com/new-for-developers-overview/email-and-user-profiles/user/#User_Profile_Fields_Reference
We can read this in the documentation for the parameter "fields" : The default response consists of keys, vars, lists, engagement, and optout_email.
In the code, if the parameter "fields" is not set, its default value is an empty array.
public function getUserByKey($id, $key, array $fields = [ ])
The problem is, if you call that function using the default values, the payload will contain an empty fields array. The response is literally this:
[]
For the default response to work, the payload must not contain the fields parameters, but the way the function is done, it always include an empty fields array if it's not set. We can't access the default response because of that.
Unless that is wanted and the documentation is out of date. I'm not sure on that part, that's why I'm opening an issue so you can decide. :)
Thank you and have a nice day!
Hi,
In the following documentation: https://getstarted.sailthru.com/new-for-developers-overview/email-and-user-profiles/user/#User_Profile_Fields_Reference
We can read this in the documentation for the parameter "fields" : The default response consists of keys, vars, lists, engagement, and optout_email.
In the code, if the parameter "fields" is not set, its default value is an empty array.
public function getUserByKey($id, $key, array $fields = [ ])The problem is, if you call that function using the default values, the payload will contain an empty fields array. The response is literally this:
[]For the default response to work, the payload must not contain the fields parameters, but the way the function is done, it always include an empty fields array if it's not set. We can't access the default response because of that.
Unless that is wanted and the documentation is out of date. I'm not sure on that part, that's why I'm opening an issue so you can decide. :)
Thank you and have a nice day!