I'm thinking there should be a populate_user() method on LDAPBackend,
but it's possible that you can't populate all the user's data without
having the user's password to do the bind. I assume if you're calling
this hypothetical method, you're saying that that is not the case. So
is there a way to do this already? Should I just customize my own auth
ldap installation?
Thanks,
Chris
from django_auth_ldap.backend import LDAPBackend, _LDAPUser
def create_user(username):
backend = LDAPBackend()
username = backend.ldap_to_django_username(username)
ldap_user = _LDAPUser(backend, username=username)
ldap_user._search_for_user_dn() # throws exception on failure
return User.objects.create(username=username)
On Mar 31, 5:29 pm, Christopher Hesse <christopher.he...@gmail.com>
wrote:
This is an easy feature to add. I'll send you a build to test. Can you elaborate on how you're using this? The documentation will make more sense if I can point to a plausible scenario.
Thanks,
Peter
> --
> To unsubscribe, reply using "remove me" as the subject.
Thanks for the build, seems to work great!
-Chris
> smime.p7s
> 6KViewDownload
Thanks