update verify invitation function