def clear_personal_information(self, cursor):
        r = cursor.one("""

            INSERT INTO community_members (slug, participant, ctime, name, is_member) (
                SELECT slug, participant, ctime, name, false
                  FROM community_members
                 WHERE participant=%(participant_id)s
                   AND is_member IS true
            );

            DELETE FROM emails WHERE participant_id = %(participant_id)s;
            DELETE FROM statements WHERE participant=%(participant_id)s;

            UPDATE participants
               SET anonymous_giving=False
                 , avatar_url=NULL
                 , email_address=NULL
                 , claimed_time=NULL
                 , session_token=NULL
                 , session_expires=now()
                 , giving=0
                 , taking=0
             WHERE username=%(username)s
         RETURNING *;

        """, dict(username=self.username, participant_id=self.id))
        self.set_attributes(**r._asdict())


    # Emails
    # ======
Clear personal information such as statements.
dataset/ETHPy150Open gratipay/gratipay.com/gratipay/models/participant.py/Participant.clear_personal_information