A function I am creating needs the id of the user who ran the function and all the information on how to do this seems to be for the deprecated req.variables way.
TL;DR
Developers are asking for the user's id executing a function. This can be retrieved from the header "x-appwrite-user-id". The deprecated req.variables method should be avoided, use the header instead.