Пример #1
0
def activate_user(strategy, user, *args, **kwargs):
    '''Activate the user and send a confirmation email'''
    if not user:
        return
    user.is_active = True
    user.save()
    send_confirmation(strategy, user)
Пример #2
0
def send_confirmation_mail(sender, email, **kwargs):
    if sender.email == email and not sender.is_active:
        sender.is_active = True
        sender.save()
        mail.send_confirmation(sender)