Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust to UW returned data #17

Closed
Tracked by #19
ymdahi opened this issue Jun 19, 2024 · 0 comments · Fixed by #19
Closed
Tracked by #19

Adjust to UW returned data #17

ymdahi opened this issue Jun 19, 2024 · 0 comments · Fixed by #19

Comments

@ymdahi
Copy link

ymdahi commented Jun 19, 2024

The UW endpoint will return data in the following format (note that it's an associative array that inheritly groups by role.id):

[
    {
        "1234": {
            "id": 1234,
            "user_id": "987",
            "username": "ydahi",
            "display_name": "Yasin Dahi",
            "first_name": "Yasin",
            "last_name": "Dahi",
            "role": {
                "id": 110
            }
        }
    },
    {
        "185": {
            "id": 185,
            "user_id": "textvalue",
            "username": "jsmith",
            "display_name": "Jim Smith",
            "first_name": "Jim",
            "last_name": "Smith",
            "role": {
                "id": 109
            }
        },
        "111": {
            "id": 111,
            "user_id": "",
            "username": "somename",
            "display_name": "Some Name",
            "first_name": "Some",
            "last_name": "Name",
            "role": {
                "id": 109
            }
        }
    },
    {
        "123": {
            "id": 123,
            "user_id": "123",
            "username": "jstudent",
            "display_name": "Jessica Student",
            "first_name": "Jessica ",
            "last_name": "Student",
            "role": {
                "id": 106
            }
        }
    },
....

Important Fields:

  1. username: use this value to match against drupal usernames to see if account exists.
  2. role.id: use this value to add the correct Drupal Role and the correct Group Role.

Role.ID mapping is provided in a separate issue.

@ymdahi ymdahi mentioned this issue Jun 21, 2024
6 tasks
@ymdahi ymdahi linked a pull request Jun 21, 2024 that will close this issue
6 tasks
ymdahi pushed a commit that referenced this issue Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant