Python's ldap module, which is modelled along OpenLDAP's API, allows us to keep the connection and doing a new bind as a different user, superseding the previous bind. Use this to simplify the code and avoid duplication.
Python's ldap module, which is modelled along OpenLDAP's API, allows us to keep the connection and doing a new bind as a different user, superseding the previous bind. Use this to simplify the code and avoid duplication.