You need an `array_map( 'intval', $_POST['user_group_ids'] );`