@mgorny is right, if you use LDAPUser here, you can get rid of the search_s and the modify_s calls, and replace them with LDAPUser.objects.get and save()