I have four profile types and wish to send a different email confirmation to each. In order to override the core "Welcome (awaiting approval)" email I am using hook_mail_alter.

I am able to find the user email type is 'user_register_pending_approval" using "switch ($message['id'])" but from there I want to find out which of the four profile types the user is using, if any.

Each profile registration page has its own url, but after the account is created they are already sent to the home page.

I am using Devel, and see what I need at $params['account']['profile_commander'] but I am not good enough at PHP to figure out how to test for that array being present. Were it a text field I could just use something like "switch ($params['account']['profile_type'])" but since it is an array I am little lost.

My profile types are:
commander
major
captain
private

What syntax would I use within hook_mail_alter to test for which profile type the user registered with, so that I can customize their email. Thanks.