def verify_email(user, dest=None):
 from r2.lib.pages import VerifyEmail
 user.email_verified = False
 user._commit()
 Award.take_away('verified_email', user)
 token = EmailVerificationToken._new(user)
 base = (g.https_endpoint or g.origin)
 emaillink = ((base + '/verification/') + token._id)
 if dest:
  emaillink += ('?dest=%s' % dest)
 g.log.debug(('Generated email verification link: ' + emaillink))
 _system_email(user.email, VerifyEmail(user=user, emaillink=emaillink).render(style='email'), Email.Kind.VERIFY_EMAIL)

def verify_email ( user , dest = None ) : from r2 . lib . pages import VerifyEmail user . email_verified = False user . _commit ( ) Award . take_away ( 'verified_email' , user ) token = EmailVerificationToken . _new ( user ) base = ( g . https_endpoint or g . origin ) emaillink = ( ( base + '/verification/' ) + token . _id ) if dest : emaillink += ( '?dest=%s' % dest ) g . log . debug ( ( 'Generated email verification link: ' + emaillink ) ) _system_email ( user . email , VerifyEmail ( user = user , emaillink = emaillink ) . render ( style = 'email' ) , Email . Kind . VERIFY_EMAIL )
for verifying an email address .