def __init__(self, manager, name, email):
    self.email = ascii_text(stringify(email))
    self.name = stringify(name)
    if (not registry.email.validate(self.email)):
        self.email = None
    if registry.email.validate(self.name):
        self.email = (self.email or ascii_text(self.name))
        self.name = None
    self.label = None
    if ((self.name is not None) and (self.email is not None)):
        self.label = ('%s <%s>' % (self.name, self.email))
    elif ((self.name is None) and (self.email is not None)):
        self.label = self.email
    elif ((self.email is None) and (self.name is not None)):
        self.label = self.name
    self.entity = None
    if (self.email is not None):
        key = self.email.lower().strip()
        fragment = safe_fragment(self.label)
        self.entity = manager.make_entity('LegalEntity')
        self.entity.make_id(key)
        self.entity.add('name', self.name)
        self.entity.add('email', self.email)
        manager.emit_entity(self.entity, fragment=fragment)
def __init__(self, manager, name, email):
    self.email = ascii_text(stringify(email))
    self.name = stringify(name)
    if (not registry.email.validate(self.email)):
        self.email = None
    if registry.email.validate(self.name):
        self.email = (self.email or ascii_text(self.name))
        self.name = None
    self.label = None
    if ((self.name is not None) and (self.email is not None)):
        self.label = ('%s <%s>' % (self.name, self.email))
    elif ((self.name is None) and (self.email is not None)):
        self.label = self.email
    elif ((self.email is None) and (self.name is not None)):
        self.label = self.name
    self.entity = None
    if (self.email is not None):
        key = self.email.lower().strip()
        fragment = safe_fragment(self.label)
        self.entity = manager.make_entity('LegalEntity')
        self.entity.make_id(key)
        self.entity.add('name', self.name)
        self.entity.add('email', self.email)
        manager.emit_entity(self.entity, fragment=fragment)