Add function parameters

For greater clarity. There is a ambiguity between the user param in the function and "var user" that I hope gets clarified as well.

This is a resubmit of #6553 from my personal account. I have also signed the CLA.