Instead of getting the values on the field, why don't call a method on your model to execute the query?
– Pep LainezNov 23 '15 at 17:37

1

Pep Lainez has it correct. To do what you are trying to do you are going to have to move that to your model. In your model create a function that will query the database using JFactory::getUser()->id Loop through the results and format them as an option list, then return that option list and print it out in your default.php file between the select element tags
– Terry CarterFeb 4 '16 at 18:28

Use jQuery onChange event and execute a controller task that will provide you a JSON result with data you need. If this is not a component you will need to create one. Alternatively you can try a CLI application. This is the only secure and reliable way.