Redirecting and removing user role after user account submit
I would try implementing hook_user_presave().

function custom_module_user_presave($edit, $account, $category) {
  $role_position = array_search('undesired_role', $account-&gt;roles);
  // Use !== or === here since $role_position may be zero or FALSE
  if ($role_position !== FALSE) {
    unset($account-&gt;roles[$role_position]);
  }
}