Skip to content
Snippets Groups Projects
Verified Commit fb7c6ca6 authored by nd's avatar nd
Browse files

only set mail address verified if it is not already

parent 8b531943
Branches
No related tags found
No related merge requests found
...@@ -48,7 +48,7 @@ class Command(BaseCommand): ...@@ -48,7 +48,7 @@ class Command(BaseCommand):
# set user mail adresses to verified if they match those in ldap # set user mail adresses to verified if they match those in ldap
user_emails = EmailAddress.objects.filter(user=user) user_emails = EmailAddress.objects.filter(user=user)
for mail in user_emails: for mail in user_emails:
if mail.email == user.email: if mail.email == user.email and not mail.verified:
logger.warning("update email.verified on user {} for address {} to True".format(user.username, mail.email)) logger.warning("update email.verified on user {} for address {} to True".format(user.username, mail.email))
mail.verified = True mail.verified = True
mail.save() mail.save()
......
from setuptools import setup, find_packages from setuptools import setup, find_packages
setup(name='postorius_ldap_membership_management', setup(name='postorius_ldap_membership_management',
version='1.3', version='1.4',
description='Sync subscriptions from ldap', description='Sync subscriptions from ldap',
url='https://git.cccv.de:infra/uffd/postorius-ldap-membership-management', url='https://git.cccv.de:infra/uffd/postorius-ldap-membership-management',
author='Andreas Valder', author='Andreas Valder',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment