Example #1
0
    def expire_account(self):
        """manages account expiration"""

        self.deactivate()

        accounts_logger.info("Account '%s' [id=%d] has expired" % (self.user, self.user.pk))

        mail_context = Context({'user': self.user, 'userplan': self})
        send_template_email([self.user.email], 'mail/expired_account_title.txt', 'mail/expired_account_body.txt',
                            mail_context, get_user_language(self.user))

        account_expired.send(sender=self, user=self.user)
Example #2
0
    def expire_account(self):
        """manages account expiration"""

        self.deactivate()

        accounts_logger.info("Account '%s' [id=%d] has expired" %
                             (self.user, self.user.pk))

        mail_context = {'user': self.user, 'userplan': self}
        send_template_email([self.user.email],
                            'mail/expired_account_title.txt',
                            'mail/expired_account_body.txt', mail_context,
                            get_user_language(self.user))

        account_expired.send(sender=self, user=self.user)