'action user to verify the registration email, XXXXXXXXXXXXXXXX
.. method:: Auth.verify_email([next=DEFAULT [, onvalidation=DEFAULT
[, log=DEFAULT]]])'

def verify_email(self, next=DEFAULT, log=DEFAULT):

    settings = self.settings
    request = current.request
    customise = current.deployment_settings.customise_resource('auth_user')
    if customise:
        customise(request, 'auth_user')
    key = request.args[(-1)]
    utable = settings.table_user
    query = (utable.registration_key == key)
    user = current.db(query).select(limitby=(0, 1)).first()
    if (not user):
        redirect(settings.verify_email_next)
    if (log == DEFAULT):
        log = self.messages.verify_email_log
    if (next == DEFAULT):
        next = settings.verify_email_next
    approved = self.s3_verify_user(user)
    if approved:
        user = Storage(utable._filter_fields(user, id=True))
        self.login_user(user)
    if log:
        self.log_event(log, user)
    redirect(next)
