Remove @domain.com from username at account creation #2305
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is part of an alternative solution to the request for using the sAMAccountname from AD.
#2157
#2212
This pull requests add an option to use the split UPN for the username during new Moodle account creation rather than the full UPN. This is useful if there is a 3rd party integration that relies on the username to be the sAMAccountname format, as seen in the linked issue.
The usersync code of the o365 plugin already has a function where it splits the user's UPN and matches it to a Moodle username.
o365-moodle/local/o365/classes/feature/usersync/main.php
Lines 991 to 995 in 254fce2
o365-moodle/local/o365/classes/feature/usersync/main.php
Lines 1135 to 1149 in 254fce2