Trying to use the populate_user signal to do some custom processing but no effect.
from django.dispatch import receiver
from django_auth_ldap.backend import populate_user, LDAPBackend
@receiver(populate_user, sender=LDAPBackend)
def ldap_auth_handler(user, ldap_user, **kwargs):
"""
Create mailbox and create user with email
"""
print("signal")
User gets populated, log below:
search_s('ou=people,dc=example,dc=com', 2, '(mail=%(user)s)') returned 1 objects: uid=alice,ou=people,dc=example,dc=com DEBUG:django_auth_ldap:search_s('ou=people,dc=example,dc=com', 2, '(mail=%(user)s)') returned 1 objects: uid=alice,ou=people,dc=example,dc=com Creating Django user alice@example.com DEBUG:django_auth_ldap:Creating Django user alice@example.com Populating Django user alice@example.com DEBUG:django_auth_ldap:Populating Django user alice@example.com