Extend Function To Not Apply To Certain Roles

Hi

Firstly a big thank you to @Sajid for helping me out in this thread

https://premium.wpmudev.org/forums/topic/how-to-re-map-a-url-to-new-url-with-variables

He provided the following function which is perfect.

function wpmu_map_profile_url(){
	$user_id = $_GET['user_id'];

	if($user_id){
		$new_url = get_site_url('', 'profile');
		$new_url = $new_url.'/'.$user_id;
		if(!headers_sent()){
			wp_redirect($new_url);
			exit;
		}
	}
}
add_action('admin_init', 'wpmu_map_profile_url');

Is there any way to make this so that it does not do it to two of our user roles who may still need to amend from the backend? The roles I would like to exclude from being affected by this function are 'administrator' and 'hub admin'

Many Thanks

Wayne