I've just checked the code, the reason that it did not work was a wrong fieldname in the SQL query. The original query was:
SELECT * FROM sys_user WHERE sysuser_id = $client_id
but there is no column sysuser_id in that table. The correct query is:
SELECT * FROM sys_user WHERE client_id = $client_id
so the loading of sysuser details for a specific client_id will work now.
As a solution for for looking up a client_id, I think we can either
a) add a lookup function to the API for it or
b) we return the client ID automatically in the array that the *_get functions return.
Which option would you prefer?