Closed joshwillcock closed 6 months ago
Thanks Josh - we're more of a fan of branching new versions than adding these sorts of checks in place - feel free to update it to use the new api and I'll just create a new branch in the repo here as needed otherwise I'll try to remember to come back to it!
Hey @danmarsden, I've pushed the 4.3 version, but it'll need to go to 403 & not 400... Hope it helps.
just looking back at this - get_all_user_name_fields was deprecated in 3.11, so it should be safe going on MOODLE_400_STABLE - it's just that it was removed completely in 4.3
I've manually cherry-picked this across into the MOODLE_400_STABLE branch as it works in 4.0 and higher.
This checks if the new function is available and uses it, otherwise it will use the old one keeping it backwards compatible.