{"action":"created","issue":{"url":"https://api.github.com/repos/django-auth-ldap/django-auth-ldap/issues/44","repository_url":"https://api.github.com/repos/django-auth-ldap/django-auth-ldap","labels_url":"https://api.github.com/repos/django-auth-ldap/django-auth-ldap/issues/44/labels{/name}","comments_url":"https://api.github.com/repos/django-auth-ldap/django-auth-ldap/issues/44/comments","events_url":"https://api.github.com/repos/django-auth-ldap/django-auth-ldap/issues/44/events","html_url":"https://github.com/django-auth-ldap/django-auth-ldap/issues/44","id":321886762,"node_id":"MDU6SXNzdWUzMjE4ODY3NjI=","number":44,"title":"How to access the user object","user":{"login":"bschacht","id":1143280,"node_id":"MDQ6VXNlcjExNDMyODA=","avatar_url":"https://avatars2.githubusercontent.com/u/1143280?v=4","gravatar_id":"","url":"https://api.github.com/users/bschacht","html_url":"https://github.com/bschacht","followers_url":"https://api.github.com/users/bschacht/followers","following_url":"https://api.github.com/users/bschacht/following{/other_user}","gists_url":"https://api.github.com/users/bschacht/gists{/gist_id}","starred_url":"https://api.github.com/users/bschacht/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bschacht/subscriptions","organizations_url":"https://api.github.com/users/bschacht/orgs","repos_url":"https://api.github.com/users/bschacht/repos","events_url":"https://api.github.com/users/bschacht/events{/privacy}","received_events_url":"https://api.github.com/users/bschacht/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-05-10T10:37:47Z","updated_at":"2018-06-05T09:48:38Z","closed_at":"2018-06-05T09:48:38Z","author_association":"NONE","body":"hi,\r\ni'm a bit stuck- i'm using django-auth-ldap to authenticate users and that works find. after login the user gets redirected to `/accounts/profile` which calls LdapUserDetail.as_view to show the user its attributes (the User model is just the model as provided by django):\r\n```\r\nclass LdapUserDetail(DetailView):                                                     \r\n    model = User                                         \r\n                                                                                                                                                                                                  \r\n    def get_object(self):\r\n        user = User(pk=self.request.user.id)                                                   \r\n        pprint(vars(user))                               \r\n        return user\r\n```\r\nbut the user objects attributes are all empty and there it does not contain an ldap_user object\r\n```\r\n{'_state': <django.db.models.base.ModelState object at 0x7fe2d8e1e0f0>,\r\n 'date_joined': datetime.datetime(2018, 5, 10, 10, 34, 55, 289991, tzinfo=<UTC>),\r\n 'email': '',\r\n 'first_name': '',\r\n 'id': 1,\r\n 'is_active': True,\r\n 'is_staff': False,\r\n 'is_superuser': False,\r\n 'last_login': None,\r\n 'last_name': '',\r\n 'password': '',\r\n 'username': ''}\r\n```\r\n\r\nI tried to output the user in the ```authenticate``` function in backends.py- there i can access the attributes...\r\nHow can i access the user instance as created by django-auth-ldap?"},"comment":{"url":"https://api.github.com/repos/django-auth-ldap/django-auth-ldap/issues/comments/394649878","html_url":"https://github.com/django-auth-ldap/django-auth-ldap/issues/44#issuecomment-394649878","issue_url":"https://api.github.com/repos/django-auth-ldap/django-auth-ldap/issues/44","id":394649878,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NDY0OTg3OA==","user":{"login":"bschacht","id":1143280,"node_id":"MDQ6VXNlcjExNDMyODA=","avatar_url":"https://avatars2.githubusercontent.com/u/1143280?v=4","gravatar_id":"","url":"https://api.github.com/users/bschacht","html_url":"https://github.com/bschacht","followers_url":"https://api.github.com/users/bschacht/followers","following_url":"https://api.github.com/users/bschacht/following{/other_user}","gists_url":"https://api.github.com/users/bschacht/gists{/gist_id}","starred_url":"https://api.github.com/users/bschacht/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bschacht/subscriptions","organizations_url":"https://api.github.com/users/bschacht/orgs","repos_url":"https://api.github.com/users/bschacht/repos","events_url":"https://api.github.com/users/bschacht/events{/privacy}","received_events_url":"https://api.github.com/users/bschacht/received_events","type":"User","site_admin":false},"created_at":"2018-06-05T09:48:38Z","updated_at":"2018-06-05T09:48:38Z","author_association":"NONE","body":"thanks, thats what i was looking for- meanwhile i'm using django-ldapdb for the profile (because i have to do a couple of write operations)"}}
{"actor":{"display_login":"bschacht"}}