admin newsletter

This commit is contained in:
j 2012-03-19 20:20:11 +01:00
parent 9feac30a31
commit 72e7f0dc09

View file

@ -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)