Revision 5a8eb6e7

b/snf-astakos-app/astakos/im/api/admin.py
106 106

  
107 107
    response = HttpResponse()
108 108
    response.status = 204
109
    user_info = {'username': user.username,
110
                 'uniq': user.email,
111
                 'auth_token': user.auth_token,
112
                 'auth_token_created': user.auth_token_created.isoformat(),
113
                 'auth_token_expires': user.auth_token_expires.isoformat(),
114
                 'has_credits': user.has_credits,
115
                 'has_signed_terms': user.signed_terms,
116
                 'groups': [g.name for g in user.groups.all()]}
109
    user_info = {
110
        'id': user.id,
111
        'username': user.username,
112
        'uniq': user.email,
113
        'auth_token': user.auth_token,
114
        'auth_token_created': user.auth_token_created.isoformat(),
115
        'auth_token_expires': user.auth_token_expires.isoformat(),
116
        'has_credits': user.has_credits,
117
        'has_signed_terms': user.signed_terms,
118
        'groups': [g.name for g in user.groups.all()]}
117 119
    response.content = json.dumps(user_info)
118 120
    response['Content-Type'] = 'application/json; charset=UTF-8'
119 121
    response['Content-Length'] = len(response.content)
......
142 144

  
143 145
    response = HttpResponse()
144 146
    response.status = 204
145
    user_info = {'userid': user.username,
146
                 'email': [user.email],
147
                 'name': user.realname,
148
                 'auth_token': user.auth_token,
149
                 'auth_token_created': epoch(user.auth_token_created),
150
                 'auth_token_expires': epoch(user.auth_token_expires),
151
                 'has_credits': user.has_credits,
152
                 'is_active': user.is_active,
153
                 'groups': [g.name for g in user.groups.all()]}
147
    user_info = {
148
        'id': user.id,
149
        'userid': user.username,
150
        'email': [user.email],
151
        'name': user.realname,
152
        'auth_token': user.auth_token,
153
        'auth_token_created': epoch(user.auth_token_created),
154
        'auth_token_expires': epoch(user.auth_token_expires),
155
        'has_credits': user.has_credits,
156
        'is_active': user.is_active,
157
        'groups': [g.name for g in user.groups.all()]}
154 158
    response.content = json.dumps(user_info)
155 159
    response['Content-Type'] = 'application/json; charset=UTF-8'
156 160
    response['Content-Length'] = len(response.content)

Also available in: Unified diff