User Profile Fields not syncing with External Database authentication

User Profile Fields not syncing with External Database authentication

by Jarrad Gisk -
Number of replies: 2

Hi there,

Has anyone been able to get custom User Profile Fields to sync via External Database authentication?

I've done some mappings, but those for User Profile Fields are only updating when the user logs in (those for built-in fields like first/last name, email, etc update fine). If I set one of these database fields to a built-in Moodle field (e.g., City), it populates immediately when the account is created and any time it's updated in the external database. It seems it's just custom User Profile Fields where that won't set on user creation or change in the value on the external database.

Our LDAP sync populates User Profile Fields when an account is first created just fine, so this came as a suprise. It's pushed me to having to abandon our User Profile Fields and put the data into built-in fields we weren't using, but it's not ideal, as the names are misleading (e.g., we had created an 'account type' user profile field and populate with 'volunteer' or 'staff' depending on role, but are now having to put this value into 'city', which is one of the few built-in fields that we can filter on in the user searches).

Am I missing something? Is this bugged or intended?

Average of ratings: -
In reply to Jarrad Gisk

Re: User Profile Fields not syncing with External Database authentication

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

If you're reading values from your external database into custom user profile fields in Moodle then this didn't work previously but is reported as fixed in the latest versions (3.4.5 and 3.5.2), see MDL-56093 for details.

Which version of Moodle are you using?

In reply to Leon Stringer

Re: User Profile Fields not syncing with External Database authentication

by Jarrad Gisk -
We're one 3.4.3, so I'll need to look at the upgrade!

Thanks for finding that, Leon. Your google-fu surpasses mine!