core_user_get_users not returning customfield array

core_user_get_users not returning customfield array

by Jock Coats -
Number of replies: 1

I wonder if anyone can help with this...

My understanding of the API documentation is that core_user_get_users should return two arrays as part of its response that contain preferences and, crucially, customfields (profile fields).

I believe when I tried it a few months ago (when we were on 3.10.x) that it did so. But having rebuilt my dev machine to be 3.11 and recreated a few of the user profile fields, it doesn't seem to be returning them.

I've tried all sorts of things, particularly with the user capabilities of the user which is accessing the API endpoint - right up to making them an administration user. But nothing seems to help.

All I seem to get are the basic details:

{
    "users": [
        {
            "id": 0001,
            "username": "p0000001",
            "firstname": "me",
            "lastname": "me",
            "fullname": "me",
            "email": "me@domain",
            "department": "dept",
            "firstaccess": 1347432829,
            "lastaccess": 1638536823,
            "auth": "ldap",
            "suspended": false,
            "confirmed": true,
            "lang": "en",
            "theme": "",
            "timezone": "99",
            "mailformat": 1,
            "description": "",
            "descriptionformat": 1,
            "city": "sometown",
            "country": "GB",
            "profileimageurlsmall": "correct url",
            "profileimageurl": "correct url"
        }
    ],
    "warnings": []
}

Anyone got any ideas? Tearing my hair out here! Been through the various externallib and lib files chasing mirages and can't see anything that would stop these being returned. Absolutely critical for my next stage of development.

Cheers, Jock

Average of ratings: -
In reply to Jock Coats

Re: core_user_get_users not returning customfield array

by Jock Coats -
Oops! What an idiot I am. Yes, I had saved the data I was expecting, but in my admin account, not in the user account I was trying to query via postman! Panic over, thank you! It does seem to be working!