Introduce get_bound_ldapuser() helper.

Don't merge it yet, just review :P.