Is there a function to determine if a user is an app user or profile user?

Is there a function to determine if a user is an app user or profile user?

Anyone know of a way to determine whether a user is an app user or portal user? 

If it existed, the function would look like this:
zoho.loginuser.isAppUser();

My specific use case is that I have a Portal_User form that has a subform which is a cross-reference table to Organizations.  This allows us to have a many-to-many join between users and organizations.

Both staff users and portal user can create new portal users.

Staff users can create Portal users for all organizations.  Portal users can only create users that belong to organizations they are members of.  

When I'm determining which values to present in the drop-down, I need to know if the user is an app user or portal user as credentials of each user are evaluated differently:

Portal user - thisapp.portal.loginUserProfile();
App user - thisapp.permissions.loginUserProfile();