Fix AttributeError when ldap user not found