<input type="text" name="App_Email" value="<?php 
                        echo $u_email;
                        ?>
" size="25"/><?php 
                        ?>
<form method="post" action="<?php 
                        RMHstaffApproverUpdate();
                        ?>
"><input name="Update" type="submit" value="Update" /> </form>
            <?php 
                    } else {
                        $errors['invalid_profile'] = "Could not retrieve profile information";
                    }
                    break;
                case 'Social Worker':
                    $profileObj = retrieve_UserProfile_SW_OBJ($user_profile_id);
                    if ($profileObj) {
                        $u_Id = $profileObj->get_usernameId();
                        $u_cat = $profileObj->get_userCategory();
                        $sw_title = $profileObj->get_swTitle();
                        $sw_fname = $profileObj->get_swFirstName();
                        $sw_lname = $profileObj->get_swLastName();
                        $sw_phone = $profileObj->get_swphone();
                        $u_email = $profileObj->get_userEmail();
                        echo 'Username: '******'<br>';
function retrieveCurrentUserProfile()
{
    //since access level is stored in the session, use that to find the user category
    //1 is for social worker
    //2 is for staff approver
    //3 is for admin
    //if there is a db function available for this, this function is not needed
    $accessLevel = getUserAccessLevel();
    $userProfileId = getUserProfileID();
    switch ($accessLevel) {
        case 1:
            return retrieve_UserProfile_SW_OBJ($userProfileId);
            break;
        case 2:
            return retrieve_UserProfile_RMHApprover_OBJ($userProfileId);
            break;
        case 3:
            $userProfile = retrieve_UserProfile_RMHAdmin($userProfileId);
            return is_array($userProfile) ? current($userProfile) : false;
            break;
        default:
            return false;
            break;
    }
}