catalyst / moodle-auth_saml2

SAML done 100% in Moodle, fast, simple, secure
https://moodle.org/plugins/auth_saml2
70 stars 132 forks source link

it should be possible for username field to be updated when it is not the mapping value. #702

Open danmarsden opened 2 years ago

danmarsden commented 2 years ago

The code prevents the username from being updated when the user is not being created here: https://github.com/catalyst/moodle-auth_saml2/blob/MOODLE_39_STABLE/classes/auth.php#L920-L927

This behavior (prevent changes) should only be applied to the field being used as the mapping value.

That way - if a site is using idnumber as the mapping value, and the username in the idp changes, it should allow it to be updated in Moodle.