def get_can_enable_ldap():
 if has_module(u'ldap'):
  return (True, None)
 else:
  return (False, _(u'LDAP authentication requires the python-ldap library, which is not installed.'))

def get_can_enable_ldap ( ) : if has_module ( u'ldap' ) : return ( True , None ) else : return ( False , _ ( u'LDAP authentication requires the python-ldap library, which is not installed.' ) )
check whether ldap authentication can be enabled .