'Return a token for email validation. This token is valid for the day
and is a hash based on a (secret) uuid generated by the forum module,
the user_id, the email and currently the day (to be updated if necessary).'

@api.model
def _generate_forum_token(self, user_id, email):

    forum_uuid = self.env['ir.config_parameter'].sudo().get_param('website_forum.uuid')
    return hashlib.sha256(('%s-%s-%s-%s' % (datetime.now().replace(hour=0, minute=0, second=0, microsecond=0), forum_uuid, user_id, email))).hexdigest()
