Custom user profile fields not updating with upload user when an external authentication method has "control"

Custom user profile fields not updating with upload user when an external authentication method has "control"

by Jock Coats -
Number of replies: 1

We have created a whole bunch of user profile fields to store information from our SRS which, when the system is up and running, will be maintained by an enrol plugin we have created that listens for traffic on an API from our SRS and then populates or updates these fields in Moodle.

However, try as we might, while it works beautifully on our dev box which only has manual authentication, as soon as we try and run upload users including these additional fields on our live or anything derived from live, which have ldap, CAS, Shibboleth and database enrolment installed, I can find no way of making upload users populate these fields for people who already exist, which will be essential for "backfilling" with data from a sql query when we switch on the plugin because the API messages only refer to current activities on the SRS.

Is there any way of telling the system I want to be able to populate these fields from a CSV  and upload users *regardless* of which authentication method the person has because they are nothing to do with any of our directory services?

Does that explain the issue enough to spark any ideas? I could go down a rabbit hole explaining what we've tried. But we've narrowed it down to these auth plugins having picked up settings to be in control of these fields.

Jock

Average of ratings: -
In reply to Jock Coats

Re: Custom user profile fields not updating with upload user when an external authentication method has "control"

by Jock Coats -
It’s okay…we found the problem. Unrelated to auth plugins at all. Just that the profile fields when created by our plugin programmatically didn’t have all the right attributes in the database to allow them to be created when a user was updated. Still quite arcane and in the bowers of the core code I think. But editing them through the web updated those default attributes then an upload worked fine. So now we have a workaround we’re going to change the process of creating the fields in our code.
Average of ratings: Useful (1)