'Get a link to complete an email verification workflow.
:param Cursor c: the cursor to use
:param unicode email: the email address to be verified
:param packages: :py:class:`~gratipay.models.package.Package` objects
for which a successful verification will also entail verification of
ownership of the package
:returns: a URL by which to complete the verification process'

def get_email_verification_link(self, c, email, *packages):

    self.app.add_event(c, u'participant', dict(id=self.id, action=u'add', values=dict(email=email)))
    nonce = self.get_email_verification_nonce(c, email)
    if packages:
        self.start_package_claims(c, nonce, *packages)
    link = u'{base_url}/~{username}/emails/verify.html?email2={encoded_email}&nonce={nonce}'
    return link.format(base_url=gratipay.base_url, username=self.username_lower, encoded_email=encode_for_querystring(email), nonce=nonce)
