The user-mod plugin follows the standard formula: calculate the dn and check existence using get_dn (in this case get_either dn). Only the dn attribute is retrieved.
In a user-mod that does not tweak objectclass another search is done to retrieve the objectclass attribute for the pre_common_callback which adds necessary objectclasses as needed (the typical case).
We can save a search by requesting and returning the objectclasses in get_either_dn().
https://github.com/freeipa/freeipa/pull/5707
master:
ipa-4-9:
Metadata Update from @frenaud: - Issue close_status updated to: fixed - Issue status updated to: Closed (was: Open)