forked from 0x2620/pandora
admin newsletter
This commit is contained in:
parent
9feac30a31
commit
72e7f0dc09
1 changed files with 1 additions and 1 deletions
|
@ -198,7 +198,7 @@ def user_post_save(sender, instance, **kwargs):
|
||||||
profile, new = UserProfile.objects.get_or_create(user=instance)
|
profile, new = UserProfile.objects.get_or_create(user=instance)
|
||||||
if new and instance.is_superuser:
|
if new and instance.is_superuser:
|
||||||
profile.level = len(settings.CONFIG['userLevels']) - 1
|
profile.level = len(settings.CONFIG['userLevels']) - 1
|
||||||
profile.newsletter = settings.CONFIG['user']['newsletter']
|
profile.newsletter = True
|
||||||
profile.save()
|
profile.save()
|
||||||
SessionData.objects.filter(user=instance).update(level=profile.level,
|
SessionData.objects.filter(user=instance).update(level=profile.level,
|
||||||
username=instance.username)
|
username=instance.username)
|
||||||
|
|
Loading…
Reference in a new issue