Custom function - How to get current logged in user details

Custom function - How to get current logged in user details

Hi,
I want to create a script where I can change some fields based on the logged-in user's division or role.
But it seems like I only can get a hold of the following fields:
  1. zoho.loginuserid
  2. zoho.loginuser
Any idea of how I can get a hold of the user object?