How Do I Use the API to get User information

If I have different user roles such that the object hierarchy looks like this:

Accounts

General User

Admin

And I want to get data from the logged-in Admin user (which is specific to the Admin object and does not also belong to the General User object), how could I do that?

Note that Knack.getUserAttributes() only returns field data from the logged-in "Account" object, not the specific User Role of the logged-in user.

Justin is correct - to access the currently logged-in user's role-specific fields, you need to use Knack.getUserAttributes() to get their e-mail address, then do a query against the role object to fetch the matching record to the ID of that field. Then you can update the fields in that role object.

i really wish the level of interactivity on these boards was better, someone must know the answers to this stuff :(

I would like the answer to this as well. I can only access and set the account level information via script how do you access and set account -> user role fields

I'm guessing some modification of this function but how do I specify the role attribute here to get the customer role field I created?

Knack.getUserAttributes().ROLE-SPECIFIC-FIELD

You could get the email address from user attributes and then send a get request to the admin object or to a hidden view showing the admins (using filters to find the matching email)