'Given an email address, modify the database.
This is where we actually mark the email address as verified.
Additionally, we clear out any competing claims to the same address.'

def save_email_address(self, cursor, address):

    cursor.run(u'\n                                                UPDATE    emails\n                                                            SET    verified=true,    verification_end=now(),    nonce=NULL\n                                                    WHERE    participant_id=%s\n                                                            AND    address=%s\n                                                            AND    verified    IS    NULL\n                                ', (self.id, address))
    cursor.run(u'\n                                                DELETE\n                                                        FROM    emails\n                                                    WHERE    participant_id    !=    %s\n                                                            AND    address=%s\n                                ', (self.id, address))
    if (not self.email_address):
        self.set_primary_email(address, cursor)
