@drewpearce is there a way to access the user object with php? like user.id?
EDIT:
Got it ya'll to access a user's info in a custom script do this:
$userInfo = ServiceHandler::handleRequest('GET','user','session',[ ],[ ]);
Follows the paradigm Drew left us above.
'session' can be replaced with whatever other resource (like 'custom', or 'profile', or left blank).
Now trying to figure out how to access a user's custom lookup key...