예제 #1
0
def user_post_save_wrapper(kwargs={}):
    user = kwargs.get('instance')
    created = kwargs.get('created')
    if created:
        LOG.debug("new user %s created" % user)
        user.is_active = True
        user.is_staff = True
        user.save()
        # notify new user create
        notify_new_user_creation(user)
def user_post_save_wrapper(kwargs={}):
    user = kwargs.get('instance')
    created = kwargs.get('created')
    if created:
        LOG.debug("new user %s created" % user)
        user.is_active = True
        user.is_staff = True
        user.save()
        # notify new user create
        notify_new_user_creation(user)
예제 #3
0
def user_post_save_wrapper(kwargs={}):
    user = kwargs.get('instance')
    created = kwargs.get('created')
    if created:
        LOG.debug("new user %s created" % user)
        user.is_active = True
        user.is_staff = True
        user.save()
        # notify new user create
        must_send_mail = Configuration.get_by_name_as_int(
            'new_user_send_mail', 1)
        if must_send_mail:
            notify_new_user_creation(user)