Skip to content
Snippets Groups Projects
Verified Commit 9fbaa094 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Rename ldap sync function

parent 505f75a9
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@ from django.db.models.signals import post_save
from aleksis.core.util.apps import AppConfig
from .util.ldap_sync import ldap_create_user
from .util.ldap_sync import ldap_sync_from_user
class LDAPConfig(AppConfig):
name = "aleksis.apps.ldap"
......@@ -12,4 +12,4 @@ class LDAPConfig(AppConfig):
def ready(self) -> None:
super().ready()
User = get_user_model()
post_save.connect(ldap_create_user, sender=User)
post_save.connect(ldap_sync_from_user, sender=User)
......@@ -4,7 +4,7 @@ from django.contrib.auth import get_user_model
from constance import config
def ldap_create_user(sender, instance, created, raw, using, update_fields, **kwargs):
def ldap_sync_from_user(sender, instance, created, raw, using, update_fields, **kwargs):
""" Find ldap users by configurable matching fields and connect them to django users. """
Person = apps.get_model("core", "Person")
Group = apps.get_model("core", "Group")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment